[squid-users] How to fix a "Zero Sized Reply" error

From: Bastien Ceriani <bastien.ceriani_at_bulkypix.com>
Date: Wed, 16 Jan 2013 17:35:14 +0100

Hi,

We use Squid 3.1.20.
We are often exposed to a problem which return a "Zero Sized Error".

Can i fix it with some options on the squid configuration file ?
I tried all of things mentioned after :

 - Delete or rename your cookie file and configure your browser to
prompt you before accepting any new cookies.
 - Disable HTTP persistent connections with the
server_persistent_connections and client_persistent_connections
directives.
 - Disable any advanced TCP features on the Squid system. Disable ECN
on Linux with echo 0 > /proc/sys/net/ipv4/tcp_ecn/.

I will try to find the origin of the problem with a tcpdump on my
proxy my i don't known how could i exploit it.
This is the result of the TCP stream between my proxy and the website :

GET / HTTP/1.1
Host: www.mopub.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Via: 1.1 localhost (squid/3.1.20)
X-Forwarded-For: 192.168.1.137
Cache-Control: max-age=259200
Connection: keep-alive

And between the proxy and the client :

GET http://www.mopub.com/ HTTP/1.1
Host: www.mopub.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive

HTTP/1.0 502 Bad Gateway
Server: squid/3.1.20
Mime-Version: 1.0
Date: Wed, 16 Jan 2013 15:41:51 GMT
Content-Type: text/html
Content-Length: 3335
X-Squid-Error: ERR_ZERO_SIZE_OBJECT 0
Vary: Accept-Language
Content-Language: en-us
X-Cache: MISS from localhost
X-Cache-Lookup: MISS from localhost:3128
Via: 1.0 localhost (squid/3.1.20)
Connection: keep-alive

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta
http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: The requested URL could not be retrieved</title> <style
type="text/css"><!-- /*
 Stylesheet for Squid Error pages
 Adapted from design by Free CSS Templates
 http://www.freecsstemplates.org
 Released for free under a Creative Commons Attribution 2.5 License
*/

/* Page basics */
* {
.font-family: verdana, sans-serif;
}

html body {
.margin: 0;
.padding: 0;
.background: #efefef;
.font-size: 12px;
.color: #1e1e1e;
}

/* Page displayed title area */
#titles {
.margin-left: 15px;
.padding: 10px;
.padding-left: 100px;
.background: url('http://www.squid-cache.org/Artwork/SN.png') no-repeat left;
}

/* initial title */
#titles h1 {
.color: #000000;
}
#titles h2 {
.color: #000000;
}

/* special event: FTP success page titles */
#titles ftpsuccess {
.background-color:#00ff00;
.width:100%;
}

/* Page displayed body content area */
#content {
.padding: 10px;
.background: #ffffff;
}

/* General text */
p {
}

/* error brief description */
#error p {
}

/* some data which may have caused the problem */
#data {
}

/* the error message received from the system or other software */
#sysmsg {
}

pre {
    font-family:sans-serif;
}

/* special event: FTP / Gopher directory listing */
#dirmsg {
    font-family: courier;
    color: black;
    font-size: 10pt;
}
#dirlisting {
    margin-left: 2%;
    margin-right: 2%;
}
#dirlisting tr.entry td.icon,td.filename,td.size,td.date {
    border-bottom: groove;
}
#dirlisting td.size {
    width: 50px;
    text-align: right;
    padding-right: 5px;
}

/* horizontal lines */
hr {
.margin: 0;
}

/* page displayed footer area */
#footer {
.font-size: 9px;
.padding-left: 10px;
}
  body :lang(fa) { direction: rtl; font-size: 100%; font-family:
Tahoma, Roya, sans-serif; float: right; } :lang(he) { direction: rtl;
} --></style> </head><body id=ERR_ZERO_SIZE_OBJECT> <div id="titles">
<h1>ERROR</h1> <h2>The requested URL could not be retrieved</h2>
</div> <hr> <div id="content"> <p>The following error was encountered
while trying to retrieve the URL: <a
href="http://www.mopub.com/">http://www.mopub.com/</a></p>
<blockquote id="error"> <p><b>Zero Sized Reply</b></p> </blockquote>
<p>Squid did not receive any data for this request.</p> <p>Your cache
administrator is <a
href="mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_ZERO_SIZE_OBJECT&amp;body=CacheHost%3A%20localhost%0D%0AErrPage%3A%20ERR_ZERO_SIZE_OBJECT%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Wed,%2016%20Jan%202013%2015%3A41%3A51%20GMT%0D%0A%0D%0AClientIP%3A%20192.168.1.137%0D%0AServerIP%3A%20199.204.138.90%0D%0A%0D%0AHTTP%20Request%3A%0D%0AGET%20%2F%20HTTP%2F1.1%0AHost%3A%20www.mopub.com%0D%0AUser-Agent%3A%20Mozilla%2F5.0%20(Windows%20NT%206.1%3B%20rv%3A17.0)%20Gecko%2F20100101%20Firefox%2F17.0%0D%0AAccept%3A%20text%2Fhtml,application%2Fxhtml+xml,application%2Fxml%3Bq%3D0.9,*%2F*%3Bq%3D0.8%0D%0AAccept-Language%3A%20en-US,en%3Bq%3D0.5%0D%0AAccept-Encoding%3A%20gzip,%20deflate%0D%0AProxy-Connection%3A%20keep-alive%0D%0A%0D%0A%0D%0A">webmaster</a>.</p>
<br> </div> <hr> <div id="footer"> <p>Generated Wed, 16 Jan 2013
15:41:51 GMT by localhost (squid/3.1.20)</p> <!-- ERR_ZERO_SIZE_OBJECT
--> </div> </body></html>

Regards,

--
Bastien CERIANI
Received on Wed Jan 16 2013 - 16:35:22 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 17 2013 - 12:00:04 MST