You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Costas Stergiou <cs...@aias.gr> on 2002/06/10 09:00:49 UTC

Re: About thread "mod_jk: ajp13: cpu load problem with apache"

Hi Francisco,
I really know how annoying (at least) it is to find a definite problem/bug
and
have noone from the list care or try to solve it. I have been using
tomcat/apache
in a production environment for too long and I am now so commited to it I
cannot
change it.

Unfortunately, I have not found any real workaroung, BUT: I did solve the
problem
for me. The solution is quite simple and it is just a shell script that I
run it every 1 second
through crontab that checks for runaway httpd processes and kill them (only
the runaway
process).
This does not affect neither apache nor tomcat and it does resolve the
issue.
I know this is not a real solution, but reality is a really strange thing
when it comes
to productin environments. I don't like myself this solution, but in fact it
is a solution!
The script is very simple, and it works fine for AIX. Maybe for another os
you may
need to modify the ps/grep arguments but this should be fairly easy.
Here is the script:

#!/bin/ksh
##Periodically check for httpd runaway processes and kill them!
ps aux | grep HTTPServer | read a b c d
load=`echo $c|cut -f 1 -d ,`
if [ $load -gt 1 ]
then
  echo "Killing process $b since load is $c"
  kill -9 $b
fi

If you add a crontab entry with this you wil get an e-mail every time
you have a runaway process too.

If you need any more help with the above or anything else, pls say so,
kind regards,
Costas

----- Original Message -----
From: "Francisco R. Santos" <fr...@qarana.com>
To: "Costas Stergiou" <cs...@aias.gr>
Sent: Friday, June 07, 2002 12:11 PM
Subject: About thread "mod_jk: ajp13: cpu load problem with apache"


Hi Costas,

I'm having the same problem you stated in this thread
(http://www.apachelabs.org/tomcat-user/200205.mbox/%3c034e01c1f73a$2c1015a0
$2ea7a8c0@int.acn.gr%3e), and I haven't found any solution yet.

Did you find any solution for this problem?

Thanks in advance,
Francisco

__________________________________________________________________

Francisco R. Santos M�ndez                     frsantos@qarana.com
qarana Solutions S.A. Tel:+34.91.789.74.00   Fax: +34.91.789.74.01
Capit�n Haya 1, EuroCentro Building 6� floor  28020  Madrid  Spain
__________________________________________________________________


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: About thread "mod_jk: ajp13: cpu load problem with apache"

Posted by Tim Funk <fu...@joedog.org>.
I got in this thread late - but there is a bug in in 4.0.3 tomcat 
connectors that did not do error checking on the size of POST requests. 
So if a browser doesn't send enough data in a POST request and 
terminates - the tomcat process will infinite loop - asking for more 
data from the httpd process - the httpd process returns (eof) or similar 
and the error is not checked by tomcat.

This bug is fixed in 4.0.4 beta3.

Costas Stergiou wrote:
> Hi Francisco,
> I really know how annoying (at least) it is to find a definite problem/bug
> and
> have noone from the list care or try to solve it. I have been using
> tomcat/apache
> in a production environment for too long and I am now so commited to it I
> cannot
> change it.
> 
> Unfortunately, I have not found any real workaroung, BUT: I did solve the
> problem
> for me. The solution is quite simple and it is just a shell script that I
> run it every 1 second
> through crontab that checks for runaway httpd processes and kill them (only
> the runaway
> process).
> This does not affect neither apache nor tomcat and it does resolve the
> issue.
> I know this is not a real solution, but reality is a really strange thing
> when it comes
> to productin environments. I don't like myself this solution, but in fact it
> is a solution!
> The script is very simple, and it works fine for AIX. Maybe for another os
> you may
> need to modify the ps/grep arguments but this should be fairly easy.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>