You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ga...@free.fr on 2006/07/13 17:28:34 UTC

Mod_jk : function maintain()

Hi,

I'm currently working in mod_jk in order to add a particular mechanism, in this
work I have to understand the structure and the behavior of the different
workers (status, lb,...).

So I spend my time in the reverse engineering of mod_jk... An for example I
don't really understand the meaning of the function wc_maintain in the
jk_worker.c file.

Any help will is greatly appreciated.

Thanks

Thomas d'Erceville

PS : If you know a version of mod_jk source code with comments for the
functions, I will appreciate.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Mod_jk : function maintain()

Posted by Mladen Turk <mt...@apache.org>.
Jean-frederic Clere wrote:
>>
>> If you finish your maintenance module then it'll
>> be his responsibility to make a heartbeat independent
>> of the request, on the regular intervals.
> 
> Sure I need an extra program to make a real heartbeat but I still still 
> don't see how I could close a socket in a httpd son if it doesn't get a 
> request.
>

By adding additional signal to the mpm for maintenance.
Right now most mpm's have two: shutdown and gracefull.
Additional maintenance will do the trick.

Of course, the other solution is to launch an additional
thread on child_init that will monitor the scoreboard
and do the maintenance. Little bit unusable for
prefork I'm afraid.

Regards,
Mladen.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Mod_jk : function maintain()

Posted by Jean-frederic Clere <jf...@gmail.com>.
Mladen Turk wrote:

> Jean-frederic Clere wrote:
>
>> Rainer Jung wrote:
>>
>>> It's called once a minute (at least if a request comes in) to be 
>>> able to
>>> clean up things not directly related to the actual request, like 
>>> closing
>>> idle connections.
>>>  
>>>
>> Something to add to mod_proxy probably.
>>
>
> If you finish your maintenance module then it'll
> be his responsibility to make a heartbeat independent
> of the request, on the regular intervals.

Sure I need an extra program to make a real heartbeat but I still still 
don't see how I could close a socket in a httpd son if it doesn't get a 
request.

> The problem with wc_maintain is burst load where
> you actually don't need maintain, but it happens
> anyhow, so the connection can be closed and then
> created again.
>
> Regards,
> Mladen.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Mod_jk : function maintain()

Posted by Mladen Turk <mt...@apache.org>.
Jean-frederic Clere wrote:
> Rainer Jung wrote:
> 
>> It's called once a minute (at least if a request comes in) to be able to
>> clean up things not directly related to the actual request, like closing
>> idle connections.
>>  
>>
> Something to add to mod_proxy probably.
> 

If you finish your maintenance module then it'll
be his responsibility to make a heartbeat independent
of the request, on the regular intervals.
The problem with wc_maintain is burst load where
you actually don't need maintain, but it happens
anyhow, so the connection can be closed and then
created again.

Regards,
Mladen.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Mod_jk : function maintain()

Posted by Jean-frederic Clere <jf...@gmail.com>.
Rainer Jung wrote:

>It's called once a minute (at least if a request comes in) to be able to
>clean up things not directly related to the actual request, like closing
>idle connections.
>  
>
Something to add to mod_proxy probably.

Cheers

Jean-Frederic

>gaston.azerty@free.fr schrieb:
>  
>
>>Hi,
>>
>>I'm currently working in mod_jk in order to add a particular mechanism, in this
>>work I have to understand the structure and the behavior of the different
>>workers (status, lb,...).
>>
>>So I spend my time in the reverse engineering of mod_jk... An for example I
>>don't really understand the meaning of the function wc_maintain in the
>>jk_worker.c file.
>>
>>Any help will is greatly appreciated.
>>
>>Thanks
>>
>>Thomas d'Erceville
>>
>>PS : If you know a version of mod_jk source code with comments for the
>>functions, I will appreciate.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Mod_jk : function maintain()

Posted by Rainer Jung <ra...@kippdata.de>.
It's called once a minute (at least if a request comes in) to be able to
clean up things not directly related to the actual request, like closing
idle connections.

gaston.azerty@free.fr schrieb:
> Hi,
> 
> I'm currently working in mod_jk in order to add a particular mechanism, in this
> work I have to understand the structure and the behavior of the different
> workers (status, lb,...).
> 
> So I spend my time in the reverse engineering of mod_jk... An for example I
> don't really understand the meaning of the function wc_maintain in the
> jk_worker.c file.
> 
> Any help will is greatly appreciated.
> 
> Thanks
> 
> Thomas d'Erceville
> 
> PS : If you know a version of mod_jk source code with comments for the
> functions, I will appreciate.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org