On 18 March 2010 18:55, Pierre Morel <[email protected]> wrote: > I'm using libcurl to access a web service and for efficiency, trying > to reuse connections. It's all working fine when I perform request > after request without too long delay. > > However, if there is a period of inactivity (no call to > easy_curl_perform or any curl function) of more than 15 seconds, then > the request takes a lot longer (basically instead of an average 70ms, > it's 350ms and as soon as the internet is slow, it increases from > 300ms to 2-3seconds).
Ok, I think I found the cause of the problem: the server is actually returning the keep-alive timeout in the header and it is set to 15 seconds/100 requests (which is the apache default). Changing it to another value proves it's the cause of the problem. Now, I need to see how I can circumvent this as I don't really want to change the server settings (I need it low anyway because I have numerous clients accessing the service). I also need to check why I don't see the same thing on Windows. ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
