[tpop3d-discuss] timeout problem?

Chris Lightfoot chris at ex-parrot.com
Fri, 24 Aug 2001 09:00:37 +0100


On Fri, Aug 24, 2001 at 08:57:23AM +0200, Marcin Sochacki wrote:
> Some of my users have significant problems with retrieving messages
> via tpop3d. Their connection with my server is rather slow and unstable.
> 
> There is a bad habit of breaking the download in Outlook with longer messages.
> Example:
> 
> Aug 23 20:31:07 debian tpop3d[9015]: connection_parsecommand: client [6]xxxxxxx@pl.yyyyyyy.com(10.0.0.1): received `RETR 6'
> Aug 23 20:31:07 debian tpop3d[9015]: connection_do: client [6]xxxxxxx@pl.yyyyyyy.com(10.0.0.1): sending message 6 (680570 bytes)
> Aug 23 20:31:07 debian tpop3d[9015]: connection_sendresponse: client [6]xxxxxxx@pl.yyyyyyy.com(10.0.0.1): sent `+OK Message follows:'
> Aug 23 20:39:37 debian tpop3d[9015]: write_file: write: Broken pipe

Whis message is printed because a write(2) on the socket
connected to the client returned EPIPE. This means that
the remote end dropped the connection.

> Aug 23 20:39:37 debian tpop3d[9015]: connection_sendresponse: client [6]xxxxxxx@pl.yyyyyyy.com(10.0.0.1): sent `-ERR Oops'
> Aug 23 20:39:37 debian tpop3d[9015]: authcontext_delete: finished session for `xxxxxxx@pl.yyyyyyy.com' with mysql
> 
> I've increased the `timeout-seconds' parameter in config file, and it seems to
> help a bit, but:
> 1) is there any other way to make tpop3d more stable with unstable
>    links,
> 2) what's the recommended value of `timeout-seconds' in my conditions.

Well, in the example above, the user is not being timed
out -- their client dropped the connection, apparently
between the sending of the +OK Message follows: line and
the message itself. Altering the timeout isn't going to
help much here.

The recommended value for timeout-seconds is small, on the
order of 30, because the way that tpop3d locks mailspools
prevents MTAs from delivering mail to them. A hung client
would therefore prevent any delivery of mail for 30
seconds after it hangs. The RFC recommends a value of 10
minutes, but I think that a 10 minute hiatus in those
circumstances is unacceptable. If you use maildir
mailboxes, there are no locking issues and you can set the
timeout as high as you like.

-- 
Chris Lightfoot -- www.ex-parrot.com/~chris/
 One of the lessons of history is that nothing is often
 a good thing to do -- and always a clever thing to say
 (Will Durant)