You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Miguel González Castaños <mi...@yahoo.es> on 2012/04/13 10:08:23 UTC

determining cause of MaxThreads exhausted

Dear all,

   A server that I manage has a Struts webapp with a Tomcat 5.5.x 
standalone server. No JMX or whatsoever has been configured.

   The app sends massive emails to users with some info that requires 
users to log on the webapp and fill in some forms. It seems (without any 
logs or metrics) that people tend to fill the forms right away after 
they got the emails and together with the mailing process (that requires 
DB use to get email addresses) is exhausting the maxthreads connections 
(300 as of yesterday which I have increased to 400).

   I assume it's not going to be easy to determine what is the cause of 
the issue but which tools can I use?

   I guess I need to log in some way how the server is behaving. Maybe 
enabling JMX or Javamelody? Any way of getting where the webapp is 
hanged or where in the code of the webapp is hanging?

   And which tool can help me to simulate the load of so many people 
connecting to the webapp remotely?

   Regards,

   Miguel

This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender.

Please consider the environment before printing this email.


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


Re: determining cause of MaxThreads exhausted

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Miguel,

On 4/13/12 4:40 PM, Miguel González Castaños wrote:
> 
>>> The app sends massive emails to users with some info that
>>> requires users to log on the webapp and fill in some forms. It
>>> seems (without any logs or metrics) that people tend to fill
>>> the forms right away after they got the emails and together
>>> with the mailing process (that requires DB use to get email
>>> addresses) is exhausting the maxthreads connections (300 as of
>>> yesterday which I have increased to 400).
>> Are you running out of request processors (<Connector>
>> maxThreads) or are you running out of database connections
>> (<Resource>  maxActive)?
> MaxThreads
>> Yes: log the timestamp of each access, then use one of the many
>> fine web server analysis tools to get a picture (literally) of
>> your volume.
> I have an access log with timestamps, which tool do you recommend
> to get an analysis?

http://lmgtfy.com/?q=web+server+log+analysis

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+f91oACgkQ9CaO5/Lv0PB0oACePzOY8ojlBL03lj8WGCUSgGXb
KOIAn2Rdpwi9t2UCr4DrkI25YWdIi+Tl
=PbcW
-----END PGP SIGNATURE-----

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


Re: determining cause of MaxThreads exhausted

Posted by Miguel González Castaños <mi...@yahoo.es>.
>> The app sends massive emails to users with some info that requires
>> users to log on the webapp and fill in some forms. It seems
>> (without any logs or metrics) that people tend to fill the forms
>> right away after they got the emails and together with the mailing
>> process (that requires DB use to get email addresses) is exhausting
>> the maxthreads connections (300 as of yesterday which I have
>> increased to 400).
> Are you running out of request processors (<Connector>  maxThreads) or
> are you running out of database connections (<Resource>  maxActive)?
MaxThreads
> Yes: log the timestamp of each access, then use one of the many fine
> web server analysis tools to get a picture (literally) of your volume.
I have an access log with timestamps, which tool do you recommend to get 
an analysis?

Regards,

Miguel

This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender.

Please consider the environment before printing this email.


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


Re: determining cause of MaxThreads exhausted

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Miguel,

On 4/13/12 4:27 AM, Miguel González Castaños wrote:
> The app sends massive emails to users with some info that requires 
> users to log on the webapp and fill in some forms. It seems
> (without any logs or metrics) that people tend to fill the forms
> right away after they got the emails and together with the mailing
> process (that requires DB use to get email addresses) is exhausting
> the maxthreads connections (300 as of yesterday which I have
> increased to 400).

Are you running out of request processors (<Connector> maxThreads) or
are you running out of database connections (<Resource> maxActive)?

>> How many emails does it send?
> Around 1000 a minute

I'm not sure the email volume has anything to do with the resource
availability, other than an email may intise someone to go to your
site, which will (temporarily) use up a request processor thread and
(possibly) a database connection.

> Any way to use access log to get a view of how many visitors (not 
> connections) we are getting?

Yes: log the timestamp of each access, then use one of the many fine
web server analysis tools to get a picture (literally) of your volume.

> Any howto or article that explains of how to use JMeter in an 
> environment like this?

JMeter is used virtually the same way in all environments: only you
understand the nuances of your own software and can craft a load test
that is appropriate for your application.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+IjZsACgkQ9CaO5/Lv0PCtIQCgkZQncIn89KmLG5dvTyweJ90q
xtYAn1aeBsx+W97Kx0sqeIq489HFFKXF
=PKaP
-----END PGP SIGNATURE-----

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


Re: determining cause of MaxThreads exhausted

Posted by Miguel González Castaños <mi...@yahoo.es>.
On 13/04/2012 10:14, Pid * wrote:
> On 13 Apr 2012, at 09:09, "Miguel González Castaños"
> <mi...@yahoo.es>  wrote:
>
>> Dear all,
>>
>>   A server that I manage has a Struts webapp with a Tomcat 5.5.x standalone server. No JMX or whatsoever has been configured.
>>
>>   The app sends massive emails to users with some info that requires users to log on the webapp and fill in some forms. It seems (without any logs or metrics) that people tend to fill the forms right away after they got the emails and together with the mailing process (that requires DB use to get email addresses) is exhausting the maxthreads connections (300 as of yesterday which I have increased to 400).
> How many emails does it send?
Around 1000 a minute
>
>>   I assume it's not going to be easy to determine what is the cause of the issue but which tools can I use?
> It might just be simple maths. If you send more than 400 emails and
> most of those people immediately respond, what would you expect to
> happen?
>
>
>>   I guess I need to log in some way how the server is behaving. Maybe enabling JMX or Javamelody? Any way of getting where the webapp is hanged or where in the code of the webapp is hanging?
> Access log?
> Enable JMX, use VisualVM/JConsole.
Any way to use access log to get a view of how many visitors (not 
connections) we are getting?

>
>
>>   And which tool can help me to simulate the load of so many people connecting to the webapp remotely?
> JMeter.
Any howto or article that explains of how to use JMeter in an 
environment like this?

Miguel

This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender.

Please consider the environment before printing this email.


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


Re: determining cause of MaxThreads exhausted

Posted by Pid * <pi...@pidster.com>.
On 13 Apr 2012, at 09:09, "Miguel González Castaños"
<mi...@yahoo.es> wrote:

> Dear all,
>
>  A server that I manage has a Struts webapp with a Tomcat 5.5.x standalone server. No JMX or whatsoever has been configured.
>
>  The app sends massive emails to users with some info that requires users to log on the webapp and fill in some forms. It seems (without any logs or metrics) that people tend to fill the forms right away after they got the emails and together with the mailing process (that requires DB use to get email addresses) is exhausting the maxthreads connections (300 as of yesterday which I have increased to 400).

How many emails does it send?

>  I assume it's not going to be easy to determine what is the cause of the issue but which tools can I use?

It might just be simple maths. If you send more than 400 emails and
most of those people immediately respond, what would you expect to
happen?


>  I guess I need to log in some way how the server is behaving. Maybe enabling JMX or Javamelody? Any way of getting where the webapp is hanged or where in the code of the webapp is hanging?

Access log?
Enable JMX, use VisualVM/JConsole.


>  And which tool can help me to simulate the load of so many people connecting to the webapp remotely?

JMeter.


p


>
>  Regards,
>
>  Miguel
>
> This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender.
>
> Please consider the environment before printing this email.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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