You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by alchemist vk <al...@gmail.com> on 2020/10/07 10:53:12 UTC

[users@httpd] Configuring KeepAliveTimeout to individual URIs

Hi All,
 I have a requirement where serving GET on few URIs whose payload is large
takes more than 1min compared to our configured "KeepAliveTimeout 60"
directive. And this is resulting in 503 error to clients.
Is there a way where I can group few URIs and increase KeepAliveTimeout to
300 secs ?
Tried for locationmatch but cant configure KeepAliveTimeout directive
inside the locationmatch.

Any help is appreciated .

WR
A

Re: [users@httpd] Configuring KeepAliveTimeout to individual URIs

Posted by Daniel Ferradal <df...@apache.org>.
Perhaps you want to adjust timeout for that backend?

For example if you are proxying to a backend that takes about 100
seconds for /path/

ProxyPass /path/ https://backend/path/ timeout=120

El mié., 7 oct. 2020 a las 14:41, alchemist vk
(<al...@gmail.com>) escribió:
>
> Hi Eric,
> I agree with you.. "keepalive timeout is n/a in the middle of a response".
>
> WR
> A
>
> On Wed, Oct 7, 2020 at 5:58 PM Eric Covener <co...@gmail.com> wrote:
>>
>> On Wed, Oct 7, 2020 at 7:54 AM alchemist vk <al...@gmail.com> wrote:
>> >
>> > Hi Eric,
>> >  Thanks for response..
>> >  To give more info, I have an URI where GET on this needs lot of processing from backend to process, populate and  frame the response and then rendering the same.
>> > So what is happening is, by having KeepAliveTimeout as 60, processing and framing of this response taking more than 60 and hence apache returns 503.
>> > As a trial, Increased the KeepAliveTimeout to 300 and its working fine always.
>>
>> as politely as possible: I would be shocked if your final observation
>> was not wrong.  The keepalive timeout is n/a in the middle of a
>> response.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>


-- 
Daniel

-- 
Daniel Ferradal
HTTPD Project
#httpd help at Freenode

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Configuring KeepAliveTimeout to individual URIs

Posted by alchemist vk <al...@gmail.com>.
Hi Eric,
I agree with you.. "keepalive timeout is n/a in the middle of a response".

WR
A

On Wed, Oct 7, 2020 at 5:58 PM Eric Covener <co...@gmail.com> wrote:

> On Wed, Oct 7, 2020 at 7:54 AM alchemist vk <al...@gmail.com>
> wrote:
> >
> > Hi Eric,
> >  Thanks for response..
> >  To give more info, I have an URI where GET on this needs lot of
> processing from backend to process, populate and  frame the response and
> then rendering the same.
> > So what is happening is, by having KeepAliveTimeout as 60, processing
> and framing of this response taking more than 60 and hence apache returns
> 503.
> > As a trial, Increased the KeepAliveTimeout to 300 and its working fine
> always.
>
> as politely as possible: I would be shocked if your final observation
> was not wrong.  The keepalive timeout is n/a in the middle of a
> response.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Configuring KeepAliveTimeout to individual URIs

Posted by Eric Covener <co...@gmail.com>.
On Wed, Oct 7, 2020 at 7:54 AM alchemist vk <al...@gmail.com> wrote:
>
> Hi Eric,
>  Thanks for response..
>  To give more info, I have an URI where GET on this needs lot of processing from backend to process, populate and  frame the response and then rendering the same.
> So what is happening is, by having KeepAliveTimeout as 60, processing and framing of this response taking more than 60 and hence apache returns 503.
> As a trial, Increased the KeepAliveTimeout to 300 and its working fine always.

as politely as possible: I would be shocked if your final observation
was not wrong.  The keepalive timeout is n/a in the middle of a
response.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Configuring KeepAliveTimeout to individual URIs

Posted by alchemist vk <al...@gmail.com>.
Hi Eric,
 Thanks for response..
 To give more info, I have an URI where GET on this needs lot of processing
from backend to process, populate and  frame the response and then
rendering the same.
So what is happening is, by having KeepAliveTimeout as 60, processing and
framing of this response taking more than 60 and hence apache returns 503.
As a trial, Increased the KeepAliveTimeout to 300 and its working fine
always.

WR
A

On Wed, Oct 7, 2020 at 4:58 PM Eric Covener <co...@gmail.com> wrote:

> On Wed, Oct 7, 2020 at 6:53 AM alchemist vk <al...@gmail.com>
> wrote:
> >
> > Hi All,
> >  I have a requirement where serving GET on few URIs whose payload is
> large takes more than 1min compared to our configured "KeepAliveTimeout 60"
> directive. And this is resulting in 503 error to clients.
> > Is there a way where I can group few URIs and increase KeepAliveTimeout
> to 300 secs ?
> > Tried for locationmatch but cant configure KeepAliveTimeout directive
> inside the locationmatch.
>
> The KeepAliveTimeout is not used while a request body is being read or
> a response is being written.
> KeepAliveTimeout is between requests, not in the middle of a request.
> There is no URL to key off of because the URL hasn't been read yet.
>
> - Is the payload above a request or response?
> - What exactly do you see in the logs when it fails?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Configuring KeepAliveTimeout to individual URIs

Posted by Eric Covener <co...@gmail.com>.
On Wed, Oct 7, 2020 at 6:53 AM alchemist vk <al...@gmail.com> wrote:
>
> Hi All,
>  I have a requirement where serving GET on few URIs whose payload is large takes more than 1min compared to our configured "KeepAliveTimeout 60" directive. And this is resulting in 503 error to clients.
> Is there a way where I can group few URIs and increase KeepAliveTimeout to 300 secs ?
> Tried for locationmatch but cant configure KeepAliveTimeout directive inside the locationmatch.

The KeepAliveTimeout is not used while a request body is being read or
a response is being written.
KeepAliveTimeout is between requests, not in the middle of a request.
There is no URL to key off of because the URL hasn't been read yet.

- Is the payload above a request or response?
- What exactly do you see in the logs when it fails?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Configuring KeepAliveTimeout to individual URIs [EXT]

Posted by alchemist vk <al...@gmail.com>.
Thanks Smith for your well informative and educative response.
Yes,  we are looking into options what you mentioned: look for bottlenecks
to speed the data processing and also streaming of the data as and when it
gets generated.


Thank you once again..

With Regards,
Venkatesh

On Wed, Oct 7, 2020 at 5:08 PM James Smith <js...@sanger.ac.uk> wrote:

> This has nothing to do with keepalivetimeout – that is to do with keeping
> a connection open to send subsequent requests without re-negotiating the
> connection.
>
> It is TimeOut which is the gap between sending packets of the response.
>
> If your response is taking more than 1 minute to generate then you are
> hitting this problem which gives you the 503.
>
> How can you get round this:
>
>
>
>    - Look for bottlenecks and speed up response;
>    - Look at how you serve the data?
>       - do you collect it altogether and return it as one big blob or can
>       you stream the data as you generate it;
>          - We have a script that generates many MB of data and can take
>          upwards of an hour to generate the data – we simply stream that output 1
>          line at a time, memory usage is extremely small and there are no timeout
>          issues;
>       - Can you look at a ticketing solution
>          - The page generates a “ticket” which kicks of the data export
>          job and returns saying data is being produced
>          - You then create a unique URL which will fetch the data/or say
>          comeback later
>          - You then have a ticker in the page which retrieves the data
>          via AJAX or just waits till ready and redirects
>
>
>
>
>
> *From:* alchemist vk <al...@gmail.com>
> *Sent:* 07 October 2020 11:53
> *To:* users@httpd.apache.org
> *Subject:* [users@httpd] Configuring KeepAliveTimeout to individual URIs
> [EXT]
>
>
>
> Hi All,
>
>  I have a requirement where serving GET on few URIs whose payload is large
> takes more than 1min compared to our configured "KeepAliveTimeout 60"
> directive. And this is resulting in 503 error to clients.
>
> Is there a way where I can group few URIs and increase KeepAliveTimeout to
> 300 secs ?
>
> Tried for locationmatch but cant configure KeepAliveTimeout directive
> inside the locationmatch.
>
>
>
> Any help is appreciated .
>
>
>
> WR
>
> A
> -- The Wellcome Sanger Institute is operated by Genome Research Limited, a
> charity registered in England with number 1021457 and a company registered
> in England with number 2742969, whose registered office is 215 Euston Road,
> London, NW1 2BE.
>

RE: [users@httpd] Configuring KeepAliveTimeout to individual URIs [EXT]

Posted by James Smith <js...@sanger.ac.uk>.
This has nothing to do with keepalivetimeout – that is to do with keeping a connection open to send subsequent requests without re-negotiating the connection.

It is TimeOut which is the gap between sending packets of the response.

If your response is taking more than 1 minute to generate then you are hitting this problem which gives you the 503.

How can you get round this:


  *   Look for bottlenecks and speed up response;
  *   Look at how you serve the data?
     *   do you collect it altogether and return it as one big blob or can you stream the data as you generate it;
        *   We have a script that generates many MB of data and can take upwards of an hour to generate the data – we simply stream that output 1 line at a time, memory usage is extremely small and there are no timeout issues;
     *   Can you look at a ticketing solution
        *   The page generates a “ticket” which kicks of the data export job and returns saying data is being produced
        *   You then create a unique URL which will fetch the data/or say comeback later
        *   You then have a ticker in the page which retrieves the data via AJAX or just waits till ready and redirects


From: alchemist vk <al...@gmail.com>
Sent: 07 October 2020 11:53
To: users@httpd.apache.org
Subject: [users@httpd] Configuring KeepAliveTimeout to individual URIs [EXT]

Hi All,
 I have a requirement where serving GET on few URIs whose payload is large takes more than 1min compared to our configured "KeepAliveTimeout 60" directive. And this is resulting in 503 error to clients.
Is there a way where I can group few URIs and increase KeepAliveTimeout to 300 secs ?
Tried for locationmatch but cant configure KeepAliveTimeout directive inside the locationmatch.

Any help is appreciated .

WR
A



-- 
 The Wellcome Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE.