Mailing List Archive

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: Configuring KeepAliveTimeout to individual URIs [ In reply to ]
On Wed, Oct 7, 2020 at 6:53 AM alchemist vk <alchemist.vk@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: Configuring KeepAliveTimeout to individual URIs [ In reply to ]
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 <covener@gmail.com> wrote:

> On Wed, Oct 7, 2020 at 6:53 AM alchemist vk <alchemist.vk@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: Configuring KeepAliveTimeout to individual URIs [ In reply to ]
On Wed, Oct 7, 2020 at 7:54 AM alchemist vk <alchemist.vk@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: Configuring KeepAliveTimeout to individual URIs [ In reply to ]
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 <covener@gmail.com> wrote:

> On Wed, Oct 7, 2020 at 7:54 AM alchemist vk <alchemist.vk@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: Configuring KeepAliveTimeout to individual URIs [ In reply to ]
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
(<alchemist.vk@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 <covener@gmail.com> wrote:
>>
>> On Wed, Oct 7, 2020 at 7:54 AM alchemist vk <alchemist.vk@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