Mobile app version of vmapp.org
Login or Join
Cody1181609

: Bizarre image loading problem from apache2 Users have complained a few times about seeing a bizarre set of pink or green stripes on our webpage. At first I thought there were a rash of video

@Cody1181609

Posted in: #Apache2 #Gzip #Images

Users have complained a few times about seeing a bizarre set of pink or green stripes on our webpage. At first I thought there were a rash of video card outages, but then someone sent me a screenshot from their browser (IE8). I later saw the same thing, but with slightly different colors on Chrome. Users have experienced this on their iPads and iPhones (iOS Safari). Because I've optimized the site to cache images, the bad image stays around until you clear your cache, so once you do, it resolves itself. My assumption is that the transmission of the image is being cut off mid-stream and then staying that way, but I can't for the life of me figure out why. Here's what I've checked:

Header length is being sent, and transmission looks okay (wget sample below):

wget www.superiorlivestock.com/templates/sla2/images/wallbg2.jpg --2012-04-05 08:46:00-- www.superiorlivestock.com/templates/sla2/images/wallbg2.jpg Resolving superiorlivestock.com (www.superiorlivestock.com)... [ip redacted]
Connecting to superiorlivestock.com (www.superiorlivestock.com)|[ip redacted]|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45926 (45K) [image/jpeg]
Saving to: `wallbg2.jpg'


Images are not being served gzipped (apache conf below):

SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary


The site is superiorlivestock.com, and here's a sample of the bad page load:


Is there something obvious I'm missing? Am I saving my images in the wrong format somehow?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cody1181609

2 Comments

Sorted by latest first Latest Oldest Best

 

@Hamaas447

The first thing I noticed when I looked at your page in Firebug is that some of your images (specifically this one, which toomanyairmiles already posted a screenshot of, and this other one) are simply huge — the first one is 4.2 megabytes!

When I first loaded the page, the huge image was corrupted, more or less like in toomanyairmiles's screenshot. When I reloaded the image, it downloaded correctly. However, curiously, in both cases the image file I got was 4,362,346 bytes long; it's just that, in the broken version, after 3,903,489 bytes the correct image data stopped and was replaced by something else (which, alas, looked just like random bytes — or compressed JPEG image data — in a hex editor).

Anyway, I suspect that resaving those few huge images at a more reasonable size should at least make the problem occur much less frequently, even if it won't actually fix the underlying cause of the data corruption. As a bonus, your website will also load faster.

10% popularity Vote Up Vote Down


 

@Murray432

It seems you're not the only one having such problems, look here and here, there are some suggestions on fixes in these threads - have you ruled these out already?

Are you in a multi web server environment? Could one of the servers in the pool have a corrupted copy of the image?

Interestingly it's not limited to the background image, and the corruption affects the downloaded image which suggests there might indeed be a problem with the file rather than the server - how are you saving the images?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme