We're having some issues with cached images not appearing on first page load. The images are being created correctly by Imagecache and the correct path to the images is being referenced by the img tag (we can visit the path given after page load and the correct cached image is there), but the images don't appear.

We have many cached images on site, but this issue is primarily occurring when many new images are cached for the first time on the same page. At first we thought this was a problem with our code. We have some very inefficient code (multiple nodes created, images transferred from Amazon products and saved on-server, ect.) that make the pages where the problem occurs very slow.

This is where the story gets a little stranger. We were only experiencing the issue on our live server, while our staging server continued to function normally. Our live server is an EC2 instance that use Amazon's RDS service to run the database, while our staging server is EC2 running mysql on the instance. As an experiment, we pointed the staging server towards an RDS database (copied from live). This introduced the problem on staging. To make sure that it wasn't a configuration difference between live/staging, we used a copy of the live database running from staging's native mysql. The problem did not occur when using live's database.

From this we've concluded that the problem is related to the use of the RDS database (we've since confirmed this on other test server instances).

Note that we have examined all logs and haven't found any evidence of memory errors, one of the culprits we initially suspected (I'm assuming memory errors would also mean the complete failure to generate images, which is not happening). We are running memcache and APC, but not Varnish.

Our hypothesis is that the RDS instance provides a faster read/write time on DB calls, allowing the page load to outrace imagecache (which is still processing the images). We know that this isn't an imagecache issue per-say, but would be obliged if any community members had additional ideas for troubleshooting. Seeing as we have to resolve this issue one way or another, we'll hopefully have further information to contribute in the near future. Thanks!

Comments

fizk’s picture

Status: Active » Closed (fixed)

Please reopen if this is still an issue with ImageCache 6.x-2.0-rc1.

fizk’s picture

Issue summary: View changes

formatting change