On Mon 13 Jul 2009 at 01:49PM, johan...@sun.com wrote: > >> Hold up, you don't need to reboot. The problem is right here. > >> > >> You're downloading 16mb at 90 k/s, which means that this will take about > >> 3.2 minutes to complete. 13:22 - 13:19 is 3 minutes, which confirms the > >> calculations. It appears that you're hitting the timeout because your > >> link is too slow. It can't download the entire file in 30 seconds, so > >> it gives up. > >> > >> A workaround for this is to set PKG_CLIENT_TIMEOUT to the number of > >> seconds before you think the transfer should time out. In this case, > >> 300 may be a reasonable value. > > > > Shouldn't the timeout be based on no communication from the server > > rather than the length of the entire transaction? That is, each time a > > package is received from the server, the 30 second timeout should start > > over, right? > > That's not how libcurl defines the timeouts. They're per operation. > The timeouts can either be configured to set a limit on the entire time > of the whole operation, or the amount of time before we cancel a > connection to the server.
Interesting. Apache also has a timeout definition but it is quite different. (Note that the apache 2.2 docs are totally wrong about that definition, it is fixed in the trunk): "The TimeOut directive defines the length of time Apache will wait for I/O in various circumstances: 1. When reading data from the client, the length of time to wait for a TCP packet to arrive if the read buffer is empty. 2. When writing data to the client, the length of time to wait for an acknowledgement of a packet if the send buffer is full. 3. In mod_cgi, the length of time to wait for output from a CGI script. 4. In mod_ext_filter, the length of time to wait for output from a filtering process. 5. In mod_proxy, the default timeout value if ProxyTimeout is not configured. This seems a little more sane for the sort of work we're doing than the libcurl definition. Would it be possible to keep resetting libcurl's conn timeout whenever new data arrives? This would mimic the behaviour we'd probably like. I guess another idea would be to just set the timeout with the expected xfer size in mind. -dp -- Daniel Price, Solaris Kernel Engineering http://blogs.sun.com/dp _______________________________________________ pkg-discuss mailing list pkg-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/pkg-discuss