Robert,
In the documentation in "18.11 TCP and HTTP Keep-Alive", there's a comment
that can very easily be falsely interpreted in meaning that you need to set
*accept_timeout* to avoid locking thread in keep-alive mode :
soap.max_keep_alive = 100; // at most 100 calls per keep-alive session
soap.accept_timeout = 600; // optional: let server time out after ten minutes
of inactivity
In the paragraph above, it correctly says to set recv_timeout, but I think
the comment above is quite misleading.
accept_timeout is only useful if you don't want to be locked forever inside
soap_accept if no connection comes, right ?
I see in the code than if you don't set accept_timeout, you'll have a default
one of 60 seconds anyway.
Also, later in the same sample code :
s = soap_accept(&soap);
if (s < 0)
{
if (soap.errnum)
soap_print_fault(&soap, stderr);
else
fprintf(stderr, "Server timed out\n"); // Assume timeout is long
enough for threads to complete serving requests
There's *no* relation between the accept timeout value and the time needed to
complete serving requests ??
Really, I mean I can for some reason want a accept timeout of 1 s and have
requests that it takes several minute to serve without any connection between
the two, right ?
Best regards,
Jean-Marc
--- In [email protected], "Robert van Engelen" <enge...@...> wrote:
>
>
> If you enabled keep-alive, then please set the recv_timeout to a lower value.
>
> The recv_timeout value prevents a thread from returning to the pool when
> keep-alive is used, since the thread will be waiting for more requests over
> the current connection.
>
> Hope this helps.
>
> - Robert