Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP Fatal error: Allowed memory size - ignoring php.ini ???
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
DNAspark99
Guru
Guru


Joined: 03 Sep 2004
Posts: 321

PostPosted: Wed Jun 24, 2009 11:50 pm    Post subject: PHP Fatal error: Allowed memory size - ignoring php.ini ??? Reply with quote

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
View user's profile Send private message
DNAspark99
Guru
Guru


Joined: 03 Sep 2004
Posts: 321

PostPosted: Thu Jun 25, 2009 1:37 am    Post subject: Reply with quote

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)


Code:
ulimit -a

Throwing ulimit into a script reports :
Code:
max memory size (kbytes, -m) unlimited
 
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Thu Jun 25, 2009 4:40 am    Post subject: Reply with quote

possible to share the responsible code?

have any ini_set within your code that might be altering memory_limit?
Back to top
View user's profile Send private message
DNAspark99
Guru
Guru


Joined: 03 Sep 2004
Posts: 321

PostPosted: Thu Jun 25, 2009 5:11 am    Post subject: Reply with quote

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
View user's profile Send private message
DNAspark99
Guru
Guru


Joined: 03 Sep 2004
Posts: 321

PostPosted: Thu Jun 25, 2009 5:38 am    Post subject: Reply with quote

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
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Thu Jun 25, 2009 9:54 pm    Post subject: Reply with quote

hanging worker process? weird.
Back to top
View user's profile Send private message
St3v3
n00b
n00b


Joined: 20 Jun 2007
Posts: 25

PostPosted: Tue Jun 30, 2009 6:35 pm    Post subject: Reply with quote

heres some good info in the subject:

http://drupal.org/node/207036
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum