Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Not all pictures loading up WordPress


I am using Templatic's "Emporium" theme, and am experiencing a problem with certain pictures not loading up- it's random pictures, not always the same ones, some missing images are on home page, some (mostly) are on the "additional views" on once I click the product. If you refresh the page then it switches, some load up and others don't. Please have a look on my website and let me know your thoughts.
Thank you.

this is what my (Analysis and Log files::Error Log) says

[Mon Jun 06 16:58:19 2011] [error] [client] (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for /home/sweetcit/public_html/index.php, referer:

[Mon Jun 06 16:58:19 2011] [error] [client] (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for /home/sweetcit/public_html/wp-content/themes/Emporium/thumb.php, referer:

I had this question up already but the post ended. here is the link

Answers (3)


Peter Michael answers:

Probably the most important bit is
<blockquote>Cannot allocate memory: couldn't create child process</blockquote>
which seems to come from
Maybe you can try to set your memory limit a little higher:
ini_set('memory_limit', '64M');
Depends on your current server configuration. If you're unsure you should consult your hosting provider support.



Josh Eaton answers:

Santo, This was one of the possibilities I mentioned in your last question, that your server instance is running out of memory while processing the images.

Depending on how your hosting is set up you either need to:

1. Edit the php.ini file:
memory_limit = 256M
max_execution_time = 300

2. Use ini_set in wp-config.php to set these settings if you can't edit the php.ini file.

ini_set('memory_limit', '256M');
ini_set('max_execution_time', '300');

Caveat: These settings are very high, check with your hosting provider to see what limits they may have set on these. You should be able to determine what they are currently set at also by looking through your hosting documentation. Try setting the values high, and then bringing them down until it stops working, then you will be able to find the level at which it should be set without having it set too high.

saint merc comments:

Do I have to change this in MySQL because I can't in wp-config.php I was able to change ini_set('memory_limit', '256M');
ini_set('max_execution_time', '300'); in thumb.php .

I didnt see any thing different.


Christianto answers:

Hi Santo,

Without denying that there is a problem with allocate memory shown on log file.
Timthumb (thumb.php) only use allocate memory when the image is <strong>being</strong> resized and put the result in cache folder.

So When user go to a page contain resized images, it will check if the image resized exists on cache folder and show it, if not exists then the image will be resize and it will use some of memory to store temp image resize.

In webkit base, I see the image didn't load correctly on the browser, and result on 500 internal server error. This could be cause by memory limit too. No matter what number of memory set, its useless if your server memory is limited and should be share with other user.

My suggestion for this problem,
1. Set the cache higher for timthumb script, on thumb.php you can see in the beginning of code:

define ('CACHE_SIZE', 250); // number of files to store before clearing cache

change CACHE_SIZE higher than currently set for example:

define ('CACHE_SIZE', 450); // number of files to store before clearing cache

2. Deactivate any thumbnail resize features and resize the image manually.

3. Use Wordpress plugin for cache like <strong>Denzel Chia</strong> said on [[LINK href=""]]your question before[[/LINK]]. WP Super Cache is a good option.

4. Move to a new server/hosting, which is not a good option at all.. :D

Hope this help..

saint merc comments:

Any other sugestions? I still have some issues but so far have added wp super cache and my hosting company changed my max_execution_time =1500
max_input_time =60 memory_limit =128m (these are my new settings) the issue seems to be improving but is not resolved.