Can you paste in what the Apache logs say in one instance where an image is not displayed? The first thing I'd like to know is if Apache itself sees the image-dropping as a problem.
As for the 503...
HTTP 503 is the standard HTTP error which just means Service Unavailable as you probably already know; It could be that a program (required program) has not started on the web-server, or has otherwise crashed.
This one should make a clear entry in the logs of the error of what exactly went wrong - because the web server is obviously sending the 503.
I think the 503 should be easier to troubleshoot than the first (missing images) problem, and may leak more info to solve the first problem too.
Good luck!
The error message means (line number references refer to varnish 2.1.3):
While fetching a header [bin/varnishd/cache_fetch.c:399], either:
a) an overflow occurred [bin/varnishd/cache_httpconn.c:170]
or
b) a error occurred when calling read() [bin/varnishd/cache_httpconn.c:175]
The number at the end is the value of errno, so since it's 0 (no error) I would assume that option a) occurred since read()
shouldn't return a negative number without setting errno.
The overflow is detected with the following code [bin/varnishd/cache_httpconn.c:167] returning a negative result:
i = (htc->ws->r - htc->rxbuf.e) - 1; /* space for NUL */
htc->ws
is a struct ws
[bin/varnishd/cache.h:126] which is a "workspace structure" The r member is the reserved length of that workspace. htc->rxbuf
refers to a struct txt
[bin/varnishd/cache.h:109] but there's no comment describing what the members (b & e) refer to. Beginning and end perhaps?
I don't know how workspaces are resized (or even if they are) but - and I'm really in guessing territory here - I would assume that some possible causes of the problem are:
- A very large number of headers
- Very long headers
- A bug in how Varnish resizes workspaces (if it does)
It might be useful to try and find the point at which the error can be forced to occur by searching through the space of:
- Header lengths
- Numbers of headers
and see if you can reliably reproduce the problem.
You may be able to work around the problem by increasing the http_headers
runtime option. (If you're running < 2.1, I think it's a compile-time or configure-time option)
Best Answer
If you have a dedicated VPS, these are some recommended troubleshooting steps:
If you have a shared VPS, then you will want to run through the suggestions in steps 1-3 above and possibly moving to a dedicated VPS or increasing your hosting package for more performance.