Joerg Sommer <[EMAIL PROTECTED]> writes:

> following scenario:
> 
> client -> 100MBit -> wwwoffle -> 2k -> server
> 
> The clients sends a file with http POST to the server. This happens:
> 
> time 0s: Client sends the file to wwwoffle
> time 1s: wwwoffle starts sending the file to the server
> time 120s: wwwoffle sends the clients the message "remote host error" and
>   kills the link to the server
> 
> I found socket-timeout with 120 seconds in my wwwoffle.conf. So I think
> after wwwoffle received the file (i.e. the POST request) it starts
> sending the file to the server and starts a timer of 120s for the
> connection to the client. But the client will not talk to wwwoffle,
> because it waits for an acknowledgement from wwwoffle that its data
> reached the server. After 120s the timeout takes place and kills the
> connection to the client, because in the last 120 secound no data crossed
> the line. But this is not the fault of the client. It's simply the result
> of the slow uplink.

The timeout is not occuring on the client socket connection, but on
the server connection.  While WWWOFFLE is writing data to the server
it does not look at the client connection and does not check for
timeouts on it.  The server connection is active, WWWOFFLE has asked
to write 2MB to it, but after 120 seconds it hasn't finished.


> So I will try now increasing the value of socket-timeout, but this is not
> a sollution, because I have no upper bound. A 2MB file need nearly 20
> minutes to send, which requires a timeout of 1000 second, which drives
> the meaning of socket-timeout ad absurdum.
> 
> Better solutions?

A better solution would be to write smaller chunks of data to the
server and have a 120 second timeout for each of them.  This way each
4K block would not timeout, and the 20 minutes that it takes to write
the whole thing will no cause a WWWOFFLE timeout.  I don't know if the
client is prepared to wait for 20 minutes getting no data though.  You
might find that the client times out and there is nothing that
WWWOFFLE can do to stop this.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             [EMAIL PROTECTED]
                                      http://www.gedanken.demon.co.uk/

WWWOFFLE users page:
        http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html

Reply via email to