Memory Management in CB?

15 years 11 months ago #22527 by lashae
Memory Management in CB? was created by lashae
Hi all,

yesterday i migrated my website to the hosting server from localhost. However when i try to login the page i continuosly see fatal error of same:

Fatal error: Allowed memory size of 6291456 bytes exhausted (tried to allocate 46080 bytes) in /home/mysite/public_html/v3/components/com_comprofiler/plugin/user/plug_cbmenu/cb.menu.php on line 816


It is obvious that i ran out of allowed memory, i know this can be fixed by increasing the memory_limit directive in php.ini however my question is that; Ok I set the memory_limit to i.e. 20MB doesn't it mean 20x1000=~20GB of ram is required for 1000 people requesting same script or am i wrong?

If i'm true i start to think that CB has serious memory management problems...

Post edited by: lashae, at: 2006/10/13 13:30

Post edited by: lashae, at: 2006/10/13 13:32

Please Log in to join the conversation.

15 years 11 months ago #22541 by beat
Replied by beat on topic Re:Memory Management in CB?
- Actually, the CB login itself doesn't use very much memory (here 46 kbytes), but Joomla! 1.0 does, and this is the small drop which makes the cup overflow... :whistle:

- Joomla recommends minimum 16 Mbyte limit per process when using extensions, and CB holds within it.

- CB's memory usage vs. performance is a constant thought in our design, but CB is a large application in its functionality, as Joomla also.

- Allocating memory in PHP does not always means using it, and the MMU of the server will not assign physical memory until it gets used.

- Memory is made free after each page served, so gets "shared" between "online" users: two examples:

a) A webserver serving 1'000 simultaneous requests serves around 100'000 users online :woohoo: , and would need to run at typically 0.01 seconds per page or less :whistle: and have about 8 GB of RAM.

b) 1000 users online clicking constantly each 10 seconds and being served in 0.1 seconds need only less than a dozen process, so no real problem there.

- Joomla 1.5 should theretically use less memory, but I didn't check yet.

- PHP memory management is made so that variables stay allocated for reuse, so that second and following calls are quicker. This explains partially the relatively large amounts used.

- My test server runs typically with 8 Mbytes memory limit, so I see if a memory allocation gets out of control during my tests.

Hope this explains a few things. ;)

There is more on that subject on www.php.net

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 10 months ago #26118 by xainoo
Replied by xainoo on topic Re:Memory Management in CB?
but plz, can't you find us a solution for this as I really can't view the profile page, I tried shutting off plugins but that's not enough!

Please Log in to join the conversation.

14 years 5 months ago #61298 by muddauber
Replied by muddauber on topic Re:Memory Management in CB?
jonlevy has post that offered 3 suggested changes to help solve memory allocation. I tried all three and it solved my problem with several thing with CB.

modified

.htaccess
php.ini
and
Joomla/administrator/components/com_comprofiler/comprofiler.class.php


I use a shared server with FreeBSD on the site with similar problems reported by xainoo

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.216 seconds

Facebook Twitter LinkedIn