Centos – Apache, suPHP, CentOS. Memory limit being hit by gd, but memory limit is set much higher than when it dies

apache-2.2centosPHPsuphp

We have a server that's handling uploads. The memory limit is set at a ridiculously high level in php.ini (800 M).. however we have gd, which is managing the image resizing, but it is dying at about 60M of memory usage (our error log is reporting a fatal error at this stage).

From all our Apache config files (CPanel/WHM managed), I can't find a RLimitMem that's set anywhere either.

I've looked as well if there's any limits set in our kernel, but can't find anything there as well.

Is there something I might be missing?

* Log detail*

09-Nov-2011 09:41:26] PHP Fatal error: Out of memory (allocated
60030976) (tried to allocate 18000 bytes) in
|pathremovedForSecurity|.php on line 60

I know that it's where GD calls createimagefromjpeg();, the issue is that the limit that it is dying at is way below what our actual server limit is.

Best Answer

Well, this is embarrassing. I've done more trawling through CPanel's config files and they hid the RLimitMEM setting in an obscure place. (/etc/httpd/conf/includes/pre_main_global.conf) I jacked that up and it works again as expected. Sorry for this wasted space thread.

Related Topic