View previous topic :: View next topic |
Author |
Message |
DNAspark99 Guru
Joined: 03 Sep 2004 Posts: 321
|
Posted: Wed Jun 24, 2009 11:50 pm Post subject: PHP Fatal error: Allowed memory size - ignoring php.ini ??? |
|
|
I've got a script encountering an 'alternate' php memory_limit
Code: | PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) |
(as demonstrated by a lower setting) in:
/etc/php/apache2-php5/php.ini :
Code: | memory_limit = 128M |
Any idea as to why/how is it ignoring the setting in php.ini ? (and yes of course apache has been restarted after changes to php.ini)
For the record, I'm actually trying to *increase* the limit as well.
This is with dev-lang/php-5.2.6-r7.
Any ideas? |
|
Back to top |
|
|
DNAspark99 Guru
Joined: 03 Sep 2004 Posts: 321
|
Posted: Thu Jun 25, 2009 1:37 am Post subject: |
|
|
even setting the following in .htaccess:
Code: | php_value memory_limit 8M |
phpinfo(); reports the 8M local limit
yet all scripts seem to be ignoring any limit (until they hit this mysterious 256M limit)
Throwing ulimit into a script reports :
Code: | max memory size (kbytes, -m) unlimited | |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Thu Jun 25, 2009 4:40 am Post subject: |
|
|
possible to share the responsible code?
have any ini_set within your code that might be altering memory_limit? |
|
Back to top |
|
|
DNAspark99 Guru
Joined: 03 Sep 2004 Posts: 321
|
Posted: Thu Jun 25, 2009 5:11 am Post subject: |
|
|
can't really share the code, but it's basically a search with a timeframe variable. If the search parameters are 'wide' enough, apparently it's (legitimately) going to require 256M+ , yet any and all changes being made (even for other vhosts running other code) it seems it is completely ignoring php.ini's memory_limit (and then when it hits 256M, php fatal error results.) |
|
Back to top |
|
|
DNAspark99 Guru
Joined: 03 Sep 2004 Posts: 321
|
Posted: Thu Jun 25, 2009 5:38 am Post subject: |
|
|
hrm, odd, it appears a 'stop & start' of apache, rather than a restart, has caused it to recognize the php.ini setting! |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Thu Jun 25, 2009 9:54 pm Post subject: |
|
|
hanging worker process? weird. |
|
Back to top |
|
|
St3v3 n00b
Joined: 20 Jun 2007 Posts: 25
|
|
Back to top |
|
|
|