TimeOut settings?

4 visualizações
Pular para a primeira mensagem não lida

Harm Lübben

não lida,
5 de abr. de 2010, 11:27:0905/04/2010
para WebROaR - Ruby Application Server
Hi there,

i got an error 500 while executing a slow SQL query (fetched some 100k
rows on a join over a dozen tables due to poor coding, which took 75
seconds to complete).
The app completed the slow query w/o errors on thin or mongrel.

So i wondered if webroar has a timeout defined after which it throws a
500? If so, is there a way to configure this?

(using version 0.3.2 before today's build)

Thanks in advance
--hl

Nikunj Limbaseeya

não lida,
6 de abr. de 2010, 08:19:4306/04/2010
para web...@googlegroups.com
Harm,

Thank you for trying out WebROaR and posting the issue on the group.

We have implemented a mechanism to identify the worker which hangs while processing a request. As per this logic if a worker is unable to process the request within 90 seconds, it sends 500 error response to end user.

Summarizing the scenario.
  • Head waits for 60 seconds to get processed request back from worker.
  • After 60 seconds it sends first PING signal and waits for 15 seconds to get a reply.
  • After 15 seconds it sends second PING signal and again waits for 15 seconds to get some reply.
  • If worker is not responding during this time interval, the head assumes the worker is in a unstable state and unable to process further requests.

We have defined values for worker idle time (WR_WKR_IDLE_TIME), ping wait time (WR_PING_WAIT_TIME) and number of ping trials (WR_PING_TRIALS) in 'wr_config.h' file.

For time being to solve your issue and run your application well you can increase these values and recompile the code.

We have also planned to make those values configurable in a future release.

Thanks,
Nikunj



--
To unsubscribe, reply using "remove me" as the subject.

Harm Lübben

não lida,
6 de abr. de 2010, 19:35:1506/04/2010
para WebROaR - Ruby Application Server
Thanks a lot for your answer,

.. and excuse my (by now well documented) sluggishness to examine the
code by myself.

On Apr 6, 2:19 pm, Nikunj Limbaseeya <nikunj.limbase...@webroar.in>
wrote:
> [..]
>    - After 60 seconds it sends first PING signal and waits for 15 sec to get a reply.

does Head awaits the worker process to complete, respectively in which
case the worker replies to a ping?
e.g. the app (worker) sends out several hundreds of emails via a
remote SMTP connection, (and this could take some time. No, it's not
spam.). Does the worker process reply to the head's ping, while it's
busy processing - or just when idle?

--hl
(1.25 thumbs up for WebRoaR!)

Nikunj Limbaseeya

não lida,
8 de abr. de 2010, 05:48:4208/04/2010
para web...@googlegroups.com
Harm,

The Head sends PING signal only if the worker is processing some request. If the worker is idle and not processing any request, then it never sends any PING signal.


>e.g. the app (worker) sends out several hundreds of emails via a
>remote SMTP connection, (and this could take some time. No, it's not
>spam.). Does the worker process reply to the head's ping, while it's
>busy processing - or just when idle?

In the scenario listed above, the worker will not be able to process PING signal if it is busy with request processing and the head assumes it is in an unable state and kill the worker. This is the bug and we are working on this issue.

-Nikunj



--

Nikunj Limbaseeya

não lida,
2 de jul. de 2010, 05:39:0502/07/2010
para Harm Lübben, web...@googlegroups.com
Harm,

Replies to your query are answered inline

On Thu, Jul 1, 2010 at 10:14 PM, Harm Lübben <harm.l...@googlemail.com> wrote:
Hi,

sorry for coming back to this issue:

The git repository contains 0.3.1 as the latest version. Actually i do
have version 0.3.2 running.
$ webroar --version
WebROaR-0.3.2

I can't find WR_WKR_IDLE_TIME anywhere in the sources of 0.3.1.
This raises two questions:
1. Where did i get version 0.3.2 from? :-)

The git repository contains 0.3.2 as the latest/fresh version which is still in development. The last stable release was 0.3.1 which was released as a gem (http://rubygems.org/gems/webroar).

If you install WebROaR gem form rubygems, you will get a default version which is 0.3.1 and if you take a fresh copy from git repository then it must be of version 0.3.2, still with development :)
 
2. How to handle timeouts in version 0.3.1?

In version 0.3.1, you would change the worker idle time by changing defined value of WR_WKR_IDLE_TIME (src/head/wr_config.h:113).

But in the latest code, we removed all defined values (will put them as config parameter later on). For time being you would change the worker idle time by changing the value of Config->Server.Worker.idle_time (src/helper/wr_config.c:60) variable.
 

Thanks in advance
--hl



On Apr 6, 2:19 pm, Nikunj Limbaseeya <nikunj.limbase...@webroar.in>
wrote:
> Harm,
>
> Thank you for trying out WebROaR and posting the issue on the group.
>
> We have implemented a mechanism to identify the worker which hangs while
> processing a request. As per this logic if a worker is unable to process the
> request within 90 seconds, it sends 500 error response to end user.
>
> Summarizing the scenario.
>
>    - Head waits for 60 seconds to get processed request back from worker.
>    - After 60 seconds it sends first PING signal and waits for 15 seconds to
>    get a reply.
>    - After 15 seconds it sends second PING signal and again waits for 15

>    seconds to get some reply.
>    - If worker is not responding during this time interval, the head assumes

>    the worker is in a unstable state and unable to process further requests.
>
> We have defined values for worker idle time (WR_WKR_IDLE_TIME), ping wait
> time (WR_PING_WAIT_TIME) and number of ping trials (WR_PING_TRIALS) in
> 'wr_config.h' file.
>
> For time being to solve your issue and run your application well you can
> increase these values and recompile the code.
>
> We have also planned to make those values configurable in a future release.
>
> Thanks,
> Nikunj
>

Dharmarth Shah

não lida,
10 de ago. de 2010, 03:58:5010/08/2010
para WebROaR - Ruby Application Server
Harm,
We have recently released WebROaR v0.4.0. We have made many parameters
configurable through 'server_internal_config.yml' file present in
'conf' directory, including the parameters to figure out hang/stuck
worker. You can manipulate following parameters under "Worker
configuration" section to increase/decrease/disable timeout value for
identifying stuck worker.

kill_timeout: Number of seconds to wait before killing identified
stuck worker. Default value is 10.
idle_timeout: If worker is unable to process request within this time,
sends PING signal. Default value is 60. Set value to 0 to disable idle
timer.
ping_timeout: Number of seconds to wait for a response of PING signal.
Default value is 15.
ping_trials: Number of PING signals to identify stuck worker. Default
value is 2.

Set idle_timeout to 0, to disable the stuck worker identification and
allow worker to take as much time it required to complete the request
processing.

Please checkout the release announcement for other details.

http://webroar.in/blog/2010/8/9/webroar-v0-4-0-supports-static-assets-encoding-and-static-ruby-library

Thanks,
Dharmarth

On Jul 2, 2:39 pm, Nikunj Limbaseeya <nikunj.limbase...@webroar.in>
wrote:
> Harm,
>
> Replies to your query are answered inline
>
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem