![]() |
litespeed PHP memory_limit not being recognised ??
Hi
I seem to be stumped on a PHP memory_limit exceeded message of which the usual php.ini edits have no use. I've edited /usr/local/lib/php.ini /usr/local/lsws/php/php.ini Both to memory_limit = 256 and restarted lightspeed but still stuck around max 32-37MB for php ? Is this because php was compiled without memory-limit flag ? PHPINFO reports 256M memory_limit Code:
memory_limit 256M 256MQuote:
test script output Quote:
Code:
<?phpIf php needs to be recompiled with memory limit flag, where do I recompile it from litespeed admin for web1 and web2 servers or from WHM easyapache ? Rest of details: On WHM/Cpanel 11.25.xx based server with litespeed 4.0.12 on 2x web servers load balanced using haproxy where load balancer ip is xxx.xx.xxx.x13 Both web1 and web2 have:
thanks George |
There is a memory limit configuration for lsphp5 external application, login to LSWS web console and check.
eaccelerator memory is counted towards that limit. |
Ah didn't know eccelerator memory is counted too !
is that eaccelerator actual used memory or the max limit defined for eaccelerator that is counted ? thanks |
eaccelerator always allocate SHM/MMAP memory all at once at beginning.
|
eaccelerator was set at 256MB
seems the soft/hard php5 limits in litespeed admin were 400M but I didn't know they were in bytes.. thought it was megabytes, so upped it to 2560 and it worked. |
working with soft/hard limit at 1280 and 2560
Quote:
|
Quote:
Like 300M |
1 Attachment(s)
thats what was set in soft hard limits by default = 400M
had to change it to 2560M to get to 256MB php.ini limit |
If eAccelerator is configured to use 256MB, the soft limit should be set above 512MB to leave 256MB for normal PHP usages. I think 600M should be enough by giving some head room.
|
hi having a problem now flowing on from original problem listed above.
1. eaccelerator using 256MB assigned value 2. now using above test script and drupal errors originally couldn't use more than 40MB when soft and hard limits were set to 400M by PHP5 external handler and memory_limit in php.ini set to 256MB 3. raising the value to soft limits and hard limits of 1280M and 2560M allowed me to fix the script and drupal related memory exceeded limits of 37-40MB, BUT now the servers are getting 503 service unavailable messages maybe due to high soft/hard memory limits in PHP5 external handler ??? So is this a bug that 1280-2560M is needed to get 256M memory_limit to work ?? 4. Also we have memcache/memcached compiled and loaded memcache.so into php.ini. Memcached server set to allocate 128MB. Now found out php.ini had memcache.so loaded twice giving the below error message. Would this also drive up php memory usage to the point of 503 service unavailable messages ? Quote:
|
| All times are GMT -7. The time now is 04:46 PM. |