/ Zope / Apsis / Pound Mailing List / Archive / 2008 / 2008-07 / pound socket linger problem with linux 2.6

[ << ] [ >> ]

[ RE: [Pound Mailing List] Re: HTTPS URI ... ] [ Re: [Pound Mailing List] pound socket linger ... ]

pound socket linger problem with linux 2.6
Pavel Stano <stanojr(at)blackhole.sk>
2008-07-30 13:41:01 [ FULL ]
Hello,

i have big problem with pound 2.4.3 and linux 2.6.24:
when download file (size 1MB or bigger), pound sometimes close
connection before file is downloaded

i can reproduce it easily with
wget --limit-rate=1k

here is example (on 1gbit lan, no router between client and sever, i
just change name and ip):

stanojr(at)scarface:~$ wget --limit-rate=1k http://example.com/test
--13:19:00--  http://example.com/test
           => `test'
Resolving example.com... 1.2.3.4
Connecting to example.com|1.2.3.4|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,048,576 (1.0M) [text/plain]

65%
[===================================================================>
                                 ] 688,128        1.00K/s    ETA 05:52

13:30:12 (1023.99 B/s) - Connection closed at byte 688128. Retrying.

--13:30:13--  http://example.com/test
  (try: 2) => `test'
Connecting to example.com|1.2.3.4|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 1,048,576 (1.0M), 360,448 (352K) remaining [text/plain]

100%[++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++===================================>]
1,048,576      1.00K/s    ETA 00:00

13:36:05 (1023.99 B/s) - `test' saved [1048576/1048576]


look at this sysctl on server:
net.ipv4.tcp_wmem = 4096        16384   4194304
write buffer memory on socket can be teoretically max 4MB

so when we download file very slowly, pound can write all data to socket
buffer, then call close(sock)
pound has linger set to 10 seconds
if client dont receive all data from server socket buffer in 10seconds,
server send after 10 seconds tcp rst packet and discard all remaining
data in buffer

lowering net.ipv4.tcp_wmem is not a solution, can you fix it in pound pls ?

Thanks
--
Pavel Stano

RE: [Pound Mailing List] pound socket linger problem with linux 2.6
"Jacob Anderson" <jwa(at)beyond-ordinary.com>
2008-07-30 17:41:01 [ FULL ]
I second this report. This happens in my system (Centos 4.3 updated nightly
with Pound 2.4.3) on a daily basis. The result is a corrupted file that can
be re-downloaded to make it work. For me, sometimes it happens, sometimes
not, and can happen on small files or large ones. 

I do see a few of these errors daily on my high traffic system.
[...]

MailBoxer