Quantcast

apache/modjk behaviour during shutdown

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

apache/modjk behaviour during shutdown

Gerhardus.Geldenhuis
Hi
I am trying to understand the behavior of our application stack during
an apache shutdown. This question might not a 100% to this list but is a
good place to start.

I am trying to understand what the behaviour would be when I shutdown an
apache that is connected via modjk to a cluster of tomcats.

I was under the impression that when apache is orderly shutdown it will
finish processing existing requests not excepting new ones and exit when
having done so. Would the same hold true for requests that is currently
being processed by the tomcat. Would apache wait for the tomcat threads
send via modjk to complete before terminating them?

My initial observations has been that this is not the case but I will
have to do more detailed analysis to be sure whether this is true or
not.

Regards

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: apache/modjk behaviour during shutdown

Mladen Turk-3
[hidden email] wrote:
>
> I was under the impression that when apache is orderly shutdown it will
> finish processing existing requests not excepting new ones and exit when
> having done so.

This is correct.

> Would the same hold true for requests that is currently
> being processed by the tomcat. Would apache wait for the tomcat threads
> send via modjk to complete before terminating them?
>

Nope. mod_jk has no clue about Tomcat's threads.
Httpd will unload (any) mod_jk module when the current
request(s) is finished (even adding Connection: close to
the outgoing headers). If the requests are taking too much
time they are forcibly closed then, so the presumption
that the current requests will be handled is only true
for 'normal' requests.

Regards
--
^(TM)

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: apache/modjk behaviour during shutdown

Gerhardus.Geldenhuis
>
> > Would the same hold true for requests that is currently being
> > processed by the tomcat. Would apache wait for the tomcat
> threads send
> > via modjk to complete before terminating them?
> >
>
> Nope. mod_jk has no clue about Tomcat's threads.
> Httpd will unload (any) mod_jk module when the current
> request(s) is finished (even adding Connection: close to the
> outgoing headers). If the requests are taking too much time
> they are forcibly closed then, so the presumption that the
> current requests will be handled is only true for 'normal' requests.
>
> Regards

Thanks Mladen,

Is "too much time" a configurable parameter and what constitutes a
normal request. Our application can take anything from 250ms to 2seconds
to return an reply. I am guessing that requests that takes 2 seconds
will probably be orphaned when the apache_httpd server is shutdown
because they take to longer.

Regards

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: apache/modjk behaviour during shutdown

Mladen Turk-3
[hidden email] wrote:
>
> Is "too much time" a configurable parameter and what constitutes a
> normal request. Our application can take anything from 250ms to 2seconds
> to return an reply. I am guessing that requests that takes 2 seconds
> will probably be orphaned when the apache_httpd server is shutdown
> because they take to longer.
>

Well since you didn't specify which httpd you are running on,
I presume it's some unix flavor and 2.2.x.
In that case you can use GracefulShutDownTimeout directive
to tune how much to wait for that.
For windows this is 30 seconds hard-coded value, so the
two second requests should be fine in your case.

Regards
--
^(TM)

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...