You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kees Jan Koster <kj...@kjkoster.org> on 2008/11/18 21:12:21 UTC

Hard limits in Tomcat?

Dear All,

I am setting up a monitoring system for Tomcat servers and I am  
looking for hard limits in Tomcat servers in general.

I found a few so far: file descriptors, memory pools (ok, these are  
jdk limits) and thread pools.

Are there any other hard limits that I can run into?

--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

The secret of success lies in the stability of the goal. -- Benjamin  
Disraeli


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


Re: Hard limits in Tomcat?

Posted by Tony Anecito <ad...@yahoo.com>.
Better yet do you want to know how the application uses Tomcat resources?

To do what Leon mentions requires a profilier that is approved for production use or have the developers write timers in the code for critical measurements say around time it takes for a request versus jdbc calls some may have to be an aggragate of many calls if that is what is happening like say 1000 calls to get data for one servlet method request.
If you can have measurements around the edge of your app and servlet container measuements you should bet set for isolating performance issues for some time.

Regards,
-Tony


--- On Wed, 11/19/08, Leon Rosenberg <ro...@googlemail.com> wrote:

> From: Leon Rosenberg <ro...@googlemail.com>
> Subject: Re: Hard limits in Tomcat?
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Date: Wednesday, November 19, 2008, 7:23 AM
> I think the question you wanna ask yourself first is,
> do you want to monitor tomcat or do you want to monitor
> your application?
> 
> regards
> Leon
> 
> On Wed, Nov 19, 2008 at 3:18 PM, Kees Jan Koster
> <kj...@gmail.com> wrote:
> > Dear Chris,
> >
> >>> I am setting up a monitoring system for Tomcat
> servers and I am looking
> >>> for hard limits in Tomcat servers in general.
> >>>
> >>> I found a few so far: file descriptors, memory
> pools (ok, these are jdk
> >>> limits) and thread pools.
> >>>
> >>> Are there any other hard limits that I can run
> into?
> >>
> >> I would call these soft limits, as they can be
> changed.
> >
> > Ah, sorry for the confusion. I should have asked for
> limits that are hard at
> > run-time. Thread pool sizes may be editable, but they
> are fixed once Tomcat
> > runs.
> >
> >> What limits are relevant? For instance, Java
> doesn't allow you to have
> >> any method with more than 64k of code. I suppose
> that's of little
> >> consequence to a running JVM, since the code would
> never be loaded.
> >
> > Yes, I ran into that limit for a generated servlet
> once. This is not the
> > kind of limit that I am looking for, as it is caught
> compile-time, not
> > run-time.
> >
> >> If you are going to count memory (heap?) and file
> descriptors, I suppose
> >> you could also count CPU time, since that is a
> limitable resource on
> >> *NIX systems.
> >
> > Hmm. It's really only useful if I can monitor both
> the maximum available
> > time and the used time. I have no idea how I would
> measure that, even at
> > unix level. It gets even more messy in virtual
> servers.
> >
> >> If you really are talking about soft limits, then
> you probably also want
> >> to see the number of requests accepted but not yet
> being handled
> >> (controlled by the <Connector>'s
> "acceptCount" attribute), the number of
> >> request processors (is this "thread
> pools" above?), the number of
> >> connections total/available/used in JDBC
> connection pools.
> >
> >
> > Ah, that is interesting too: queue fill levels that
> should under normal
> > circumstances be more or less empty. Much like the
> > ObjectPendingFinalizationCount. Thanks for that.
> >
> > How would I use it, though? In my Tomcat acceptCount
> has a value of 100.
> > That's probaly an upper limit. What is the
> 'un-use' property that goes with
> > this upper limit?
> >
> > What MBean can I talk to about JDBC connection
> pooling?
> >
> > --
> > Kees Jan
> >
> > http://java-monitor.com/forum/
> > kjkoster@kjkoster.org
> > 06-51838192
> >
> > Human beings make life so interesting. Do you know
> that in a universe so
> > full of wonders,
> > they have managed to invent boredom. Quite
> astonishing... -- Terry Partchett
> >
> >
> >
> ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail:
> users-help@tomcat.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org


      

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


Re: Hard limits in Tomcat?

Posted by Kees Jan Koster <kj...@gmail.com>.
Dear Leon,

>> Oh, don't be so dramatic. There is a whole world out there of smaller
>> companies that have one or two Tomcat servers in production,  
>> running on the
>> cheapest shared server environment they could find. This product  
>> targets
>> companies that have two or three developers, one of whom has been  
>> pressed
>> into doing the admin role on the side.
>
> yes, but why should they give their very sensitive data into the hand
> of someone? You understand that tomcat operation profile provides
> perfect opportunity for a potential attacker or competitor? Especially
> when there are tools which does the same without giving the data away.

I see, so you are saying that Tomcat's JMX stats are very sensitive.  
Is that true in all cases? For each and every running instance of  
Tomcat?

This is basically the same discussion as is currently raging between  
using internal mail servers and using Google's. I note that both you  
and I are using Google mail. Some company policies forbid the use of  
external mail systems precisely for the reasons you suggest. I've even  
worked at companies that firewalled hotmail.com to keep their  
employees off of it. Other companies decide to outsource all of their  
mail services to Google for the convenience and savings it offers.

>> I apologize if the operational model of Java-monitor startled you.  
>> That was
>> not my intention. It works this way because that takes the care and  
>> feeding
>> of the monitoring platform away from the user. Some people like  
>> that while
>> others, such as yourself, prefer not to work like this.
>
> Why dont you just supply another web/app which collects the data
> locally in the customers environment?

Well, it's kind'a hard to send out an e-mail message that your app  
server has died, when the monitor is running inside that very same  
server. Also, I have plans for rules processing that should help  
predict server death. I'm not sure everyone will want to have the  
overhead of such processing in their operational environment.

I'm not asking anyone to switch away from their existing tools. I'm  
certainly not suggesting that you use it, as Java-monitor is clearly  
not suited for your environment.

--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

Human beings make life so interesting. Do you know that in a universe  
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry  
Partchett


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


Re: Hard limits in Tomcat?

Posted by Leon Rosenberg <ro...@googlemail.com>.
Hello Kees Jan,

On Wed, Nov 19, 2008 at 8:25 PM, Kees Jan Koster <kj...@gmail.com> wrote:
> Dear Leon,
>
> Oh, don't be so dramatic. There is a whole world out there of smaller
> companies that have one or two Tomcat servers in production, running on the
> cheapest shared server environment they could find. This product targets
> companies that have two or three developers, one of whom has been pressed
> into doing the admin role on the side.

yes, but why should they give their very sensitive data into the hand
of someone? You understand that tomcat operation profile provides
perfect opportunity for a potential attacker or competitor? Especially
when there are tools which does the same without giving the data away.

>
> I apologize if the operational model of Java-monitor startled you. That was
> not my intention. It works this way because that takes the care and feeding
> of the monitoring platform away from the user. Some people like that while
> others, such as yourself, prefer not to work like this.

Why dont you just supply another web/app which collects the data
locally in the customers environment?


>
> Even in large companies, Java-monitor has its place. I spoke to one of my
> users this week and he tells me that he uses Java-monitor on the test
> machine because the process of getting JBoss performance statistics out of
> their hosting company takes days. I like it because I can check the status
> of my servers from my iPhone.

Again, there are tools which perform the same or more without giving
the data to potential competitor or hacker. Check lambdaprobe (tomcat
level) or moskito (application level).


Regards
Leon

>

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


Re: Hard limits in Tomcat?

Posted by Kees Jan Koster <kj...@gmail.com>.
Dear Leon,

> well, downloaded, installed, started, klicked, ... deleted...
>
> you should announce that your war is SENDING DATA to the central
> server in LARGE letters :-)
>
> which users are you targeting? No one i know (and i'm in the webapp
> business for about 10 years) will ever going to use this stuff, since
> its opposes all security guidelines which exists in the real
> applications world, without considering if its useful or not. It may
> sound a bit harsh, but any admin who installs java-monitor webapp on
> companies server should be fired at once (and probably will be).

Oh, don't be so dramatic. There is a whole world out there of smaller  
companies that have one or two Tomcat servers in production, running  
on the cheapest shared server environment they could find. This  
product targets companies that have two or three developers, one of  
whom has been pressed into doing the admin role on the side.

I apologize if the operational model of Java-monitor startled you.  
That was not my intention. It works this way because that takes the  
care and feeding of the monitoring platform away from the user. Some  
people like that while others, such as yourself, prefer not to work  
like this.

Even in large companies, Java-monitor has its place. I spoke to one of  
my users this week and he tells me that he uses Java-monitor on the  
test machine because the process of getting JBoss performance  
statistics out of their hosting company takes days. I like it because  
I can check the status of my servers from my iPhone.
--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


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


Re: Hard limits in Tomcat?

Posted by Leon Rosenberg <ro...@googlemail.com>.
well, downloaded, installed, started, klicked, ... deleted...

you should announce that your war is SENDING DATA to the central
server in LARGE letters :-)

which users are you targeting? No one i know (and i'm in the webapp
business for about 10 years) will ever going to use this stuff, since
its opposes all security guidelines which exists in the real
applications world, without considering if its useful or not. It may
sound a bit harsh, but any admin who installs java-monitor webapp on
companies server should be fired at once (and probably will be).

regards
Leon




On Wed, Nov 19, 2008 at 4:27 PM, Kees Jan Koster <kj...@gmail.com> wrote:
> Dear Leon,
>
>> is there a demo available on the java-monitor.com? sofar i only find a
>> php forum :-)
>
> The forum has the monitoring tool built-in. A bit weird at forst, but it
> makes it really simple to post questions, as you can just post graphs from
> the tool right on the forum. No need to make screenshots. If you register
> and log in, the tool shows up.
>
> I have not put any screenshots hi-res on-line yet. I have only two hands.
> :-( I should do that. Here are some low-res ones:
> http://java-monitor.com/forum/showthread.php?t=123
>

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


Re: Hard limits in Tomcat?

Posted by Kees Jan Koster <kj...@gmail.com>.
Dear Leon,

> is there a demo available on the java-monitor.com? sofar i only find a
> php forum :-)

The forum has the monitoring tool built-in. A bit weird at forst, but  
it makes it really simple to post questions, as you can just post  
graphs from the tool right on the forum. No need to make screenshots.  
If you register and log in, the tool shows up.

I have not put any screenshots hi-res on-line yet. I have only two  
hands. :-( I should do that. Here are some low-res ones: http://java-monitor.com/forum/showthread.php?t=123

--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

The secret of success lies in the stability of the goal. -- Benjamin  
Disraeli




--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


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


Re: Hard limits in Tomcat?

Posted by Leon Rosenberg <ro...@googlemail.com>.
is there a demo available on the java-monitor.com? sofar i only find a
php forum :-)

Leon

On Wed, Nov 19, 2008 at 3:31 PM, Kees Jan Koster <kj...@gmail.com> wrote:
> Dear Leon,
>
>> I think the question you wanna ask yourself first is,
>> do you want to monitor tomcat or do you want to monitor your application?
>
> I want to monitor Tomcat, not the application. I'm using the information to
> improve the Tomcat monitoring on Java-monitor.com. Currently you can see the
> memory pools/thread pools/file descriptors and their limits. I was just
> curious if there are any other pool-like structures inside Tomcat.
>
> I'm sure that there are many applications out there that have pools and
> limits, but Java-monitor works for all Tomcats.
> --
> Kees Jan
>
> http://java-monitor.com/forum/
> kjkoster@kjkoster.org
> 06-51838192
>
> The secret of success lies in the stability of the goal. -- Benjamin
> Disraeli
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Hard limits in Tomcat?

Posted by Kees Jan Koster <kj...@gmail.com>.
Dear Leon,

> I think the question you wanna ask yourself first is,
> do you want to monitor tomcat or do you want to monitor your  
> application?

I want to monitor Tomcat, not the application. I'm using the  
information to improve the Tomcat monitoring on Java-monitor.com.  
Currently you can see the memory pools/thread pools/file descriptors  
and their limits. I was just curious if there are any other pool-like  
structures inside Tomcat.

I'm sure that there are many applications out there that have pools  
and limits, but Java-monitor works for all Tomcats.
--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

The secret of success lies in the stability of the goal. -- Benjamin  
Disraeli


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


Re: Hard limits in Tomcat?

Posted by Leon Rosenberg <ro...@googlemail.com>.
I think the question you wanna ask yourself first is,
do you want to monitor tomcat or do you want to monitor your application?

regards
Leon

On Wed, Nov 19, 2008 at 3:18 PM, Kees Jan Koster <kj...@gmail.com> wrote:
> Dear Chris,
>
>>> I am setting up a monitoring system for Tomcat servers and I am looking
>>> for hard limits in Tomcat servers in general.
>>>
>>> I found a few so far: file descriptors, memory pools (ok, these are jdk
>>> limits) and thread pools.
>>>
>>> Are there any other hard limits that I can run into?
>>
>> I would call these soft limits, as they can be changed.
>
> Ah, sorry for the confusion. I should have asked for limits that are hard at
> run-time. Thread pool sizes may be editable, but they are fixed once Tomcat
> runs.
>
>> What limits are relevant? For instance, Java doesn't allow you to have
>> any method with more than 64k of code. I suppose that's of little
>> consequence to a running JVM, since the code would never be loaded.
>
> Yes, I ran into that limit for a generated servlet once. This is not the
> kind of limit that I am looking for, as it is caught compile-time, not
> run-time.
>
>> If you are going to count memory (heap?) and file descriptors, I suppose
>> you could also count CPU time, since that is a limitable resource on
>> *NIX systems.
>
> Hmm. It's really only useful if I can monitor both the maximum available
> time and the used time. I have no idea how I would measure that, even at
> unix level. It gets even more messy in virtual servers.
>
>> If you really are talking about soft limits, then you probably also want
>> to see the number of requests accepted but not yet being handled
>> (controlled by the <Connector>'s "acceptCount" attribute), the number of
>> request processors (is this "thread pools" above?), the number of
>> connections total/available/used in JDBC connection pools.
>
>
> Ah, that is interesting too: queue fill levels that should under normal
> circumstances be more or less empty. Much like the
> ObjectPendingFinalizationCount. Thanks for that.
>
> How would I use it, though? In my Tomcat acceptCount has a value of 100.
> That's probaly an upper limit. What is the 'un-use' property that goes with
> this upper limit?
>
> What MBean can I talk to about JDBC connection pooling?
>
> --
> Kees Jan
>
> http://java-monitor.com/forum/
> kjkoster@kjkoster.org
> 06-51838192
>
> Human beings make life so interesting. Do you know that in a universe so
> full of wonders,
> they have managed to invent boredom. Quite astonishing... -- Terry Partchett
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Hard limits in Tomcat?

Posted by Kees Jan Koster <kj...@gmail.com>.
Dear Chris,

>> Ah, sorry for the confusion. I should have asked for limits that are
>> hard at run-time. Thread pool sizes may be editable, but they are  
>> fixed
>> once Tomcat runs.
>
> Gotcha. Hard runtime limits makes a whole lot more sense. Sorry for  
> not
> jumping to that obvious conclusion. I wasn't trying to be a jerk ;)

Don't worry. Better to ask for clarification than to assume. I wish  
more people would follow your example.

>>> If you are going to count memory (heap?) and file descriptors, I  
>>> suppose
>>> you could also count CPU time, since that is a limitable resource on
>>> *NIX systems.
>>
>> Hmm. It's really only useful if I can monitor both the maximum  
>> available
>> time and the used time. I have no idea how I would measure that,  
>> even at
>> unix level. It gets even more messy in virtual servers.
>
> I don't see why virtual servers would be trickier: the kernel should  
> be
> counting beans properly. In terms of getting that information, you  
> need
> to call getrlimit to see what the limit is. I'm not sure where to get
> the current resource usage, though.

Hmmyeah. We're way off into OS-land here.

Virtual servers get esepcially tricky when a few are running on a host  
and you're in one of them. You may still be able to measure your own  
cpu usage, but you have no idea at all how much was available. So you  
can never tell if you're using what is available or not. I run Java- 
monitor's components on the bare iron for that very reason. So that I  
can see what uses the cpu and optimise the right places.

>>> If you really are talking about soft limits, then you probably  
>>> also want
>>> to see the number of requests accepted but not yet being handled
>>> (controlled by the <Connector>'s "acceptCount" attribute), the  
>>> number of
>>> request processors (is this "thread pools" above?), the number of
>>> connections total/available/used in JDBC connection pools.
>>
>>
>> Ah, that is interesting too: queue fill levels that should under  
>> normal
>> circumstances be more or less empty. Much like the
>> ObjectPendingFinalizationCount. Thanks for that.
>>
>> How would I use it, though? In my Tomcat acceptCount has a value of  
>> 100.
>> That's probaly an upper limit. What is the 'un-use' property that  
>> goes
>> with this upper limit?
>
> Do you mean something like a minimum accept count? By definition, the
> minimum accept count is 0, since you're talking about the number of
> connections that the socket will accept. It can certainly always be
> zero. But this is an OS thing, and is set when you bind to the  
> socket. I
> don't think there's a way to change this through Java after the socket
> has been bound.

Grr. Off into OS-land again. Oh well. :-)

>> What MBean can I talk to about JDBC connection pooling?
>
> You should get yourself a copy of LabmdaProbe and basically steal all
> that code. Better yet, just use LambdaProbe and save yourself a lot of
> headache. I'm sure they'd appreciate any code you'd like to donate to
> the project to sniff other limits (like file descriptors).

Yes, LambdaProbe sure looks nice. My probe code is available from  
Google code (http://code.google.com/p/java-monitor-probes/) but really  
all I do so query JMX mbeans.

Hmm. Maybe I should talk to the devs of the new default connection  
pool to incorporate a pool MBean too. That's useful for all of us,  
regardless of monitoring tool in use.

For Java-monitor I have to keep in mind that I cannot do anything  
invasive. I want the probe to be so lightweigth that installation is a  
mere 5 minutes work and has no measurable impact on the JVM's run-time  
performance.
--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

Human beings make life so interesting. Do you know that in a universe  
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry  
Partchett




--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

The secret of success lies in the stability of the goal. -- Benjamin  
Disraeli


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


Re: Hard limits in Tomcat?

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

Keen Jan,

Kees Jan Koster wrote:
> Ah, sorry for the confusion. I should have asked for limits that are
> hard at run-time. Thread pool sizes may be editable, but they are fixed
> once Tomcat runs.

Gotcha. Hard runtime limits makes a whole lot more sense. Sorry for not
jumping to that obvious conclusion. I wasn't trying to be a jerk ;)

>> What limits are relevant? For instance, Java doesn't allow you to have
>> any method with more than 64k of code. I suppose that's of little
>> consequence to a running JVM, since the code would never be loaded.
> 
> Yes, I ran into that limit for a generated servlet once. This is not the
> kind of limit that I am looking for, as it is caught compile-time, not
> run-time.

Yup: one big, nasty JSP will get you some day.

>> If you are going to count memory (heap?) and file descriptors, I suppose
>> you could also count CPU time, since that is a limitable resource on
>> *NIX systems.
> 
> Hmm. It's really only useful if I can monitor both the maximum available
> time and the used time. I have no idea how I would measure that, even at
> unix level. It gets even more messy in virtual servers.

I don't see why virtual servers would be trickier: the kernel should be
counting beans properly. In terms of getting that information, you need
to call getrlimit to see what the limit is. I'm not sure where to get
the current resource usage, though.

>> If you really are talking about soft limits, then you probably also want
>> to see the number of requests accepted but not yet being handled
>> (controlled by the <Connector>'s "acceptCount" attribute), the number of
>> request processors (is this "thread pools" above?), the number of
>> connections total/available/used in JDBC connection pools.
> 
> 
> Ah, that is interesting too: queue fill levels that should under normal
> circumstances be more or less empty. Much like the
> ObjectPendingFinalizationCount. Thanks for that.
> 
> How would I use it, though? In my Tomcat acceptCount has a value of 100.
> That's probaly an upper limit. What is the 'un-use' property that goes
> with this upper limit?

Do you mean something like a minimum accept count? By definition, the
minimum accept count is 0, since you're talking about the number of
connections that the socket will accept. It can certainly always be
zero. But this is an OS thing, and is set when you bind to the socket. I
don't think there's a way to change this through Java after the socket
has been bound.

> What MBean can I talk to about JDBC connection pooling?

You should get yourself a copy of LabmdaProbe and basically steal all
that code. Better yet, just use LambdaProbe and save yourself a lot of
headache. I'm sure they'd appreciate any code you'd like to donate to
the project to sniff other limits (like file descriptors).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkkJikACgkQ9CaO5/Lv0PBuXQCeKp58nHImA6fWFpQmwL59+h9l
uqkAoMKrYz4eRVN8rt57KzPcwVlzQFIM
=P2f6
-----END PGP SIGNATURE-----

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


Re: Hard limits in Tomcat?

Posted by Kees Jan Koster <kj...@gmail.com>.
Dear Chris,

>> I am setting up a monitoring system for Tomcat servers and I am  
>> looking
>> for hard limits in Tomcat servers in general.
>>
>> I found a few so far: file descriptors, memory pools (ok, these are  
>> jdk
>> limits) and thread pools.
>>
>> Are there any other hard limits that I can run into?
>
> I would call these soft limits, as they can be changed.

Ah, sorry for the confusion. I should have asked for limits that are  
hard at run-time. Thread pool sizes may be editable, but they are  
fixed once Tomcat runs.

> What limits are relevant? For instance, Java doesn't allow you to have
> any method with more than 64k of code. I suppose that's of little
> consequence to a running JVM, since the code would never be loaded.

Yes, I ran into that limit for a generated servlet once. This is not  
the kind of limit that I am looking for, as it is caught compile-time,  
not run-time.

> If you are going to count memory (heap?) and file descriptors, I  
> suppose
> you could also count CPU time, since that is a limitable resource on
> *NIX systems.

Hmm. It's really only useful if I can monitor both the maximum  
available time and the used time. I have no idea how I would measure  
that, even at unix level. It gets even more messy in virtual servers.

> If you really are talking about soft limits, then you probably also  
> want
> to see the number of requests accepted but not yet being handled
> (controlled by the <Connector>'s "acceptCount" attribute), the  
> number of
> request processors (is this "thread pools" above?), the number of
> connections total/available/used in JDBC connection pools.


Ah, that is interesting too: queue fill levels that should under  
normal circumstances be more or less empty. Much like the  
ObjectPendingFinalizationCount. Thanks for that.

How would I use it, though? In my Tomcat acceptCount has a value of  
100. That's probaly an upper limit. What is the 'un-use' property that  
goes with this upper limit?

What MBean can I talk to about JDBC connection pooling?

--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

Human beings make life so interesting. Do you know that in a universe  
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry  
Partchett


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


Re: Hard limits in Tomcat?

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

Kees Jan,

Kees Jan Koster wrote:
> I am setting up a monitoring system for Tomcat servers and I am looking
> for hard limits in Tomcat servers in general.
> 
> I found a few so far: file descriptors, memory pools (ok, these are jdk
> limits) and thread pools.
> 
> Are there any other hard limits that I can run into?

I would call these soft limits, as they can be changed.

What limits are relevant? For instance, Java doesn't allow you to have
any method with more than 64k of code. I suppose that's of little
consequence to a running JVM, since the code would never be loaded.

If you are going to count memory (heap?) and file descriptors, I suppose
you could also count CPU time, since that is a limitable resource on
*NIX systems.

If you really are talking about soft limits, then you probably also want
to see the number of requests accepted but not yet being handled
(controlled by the <Connector>'s "acceptCount" attribute), the number of
request processors (is this "thread pools" above?), the number of
connections total/available/used in JDBC connection pools.

Does that help?

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkjPLUACgkQ9CaO5/Lv0PBlYACbBopvrcbKmuHs8He1a+riMuFm
mNMAoLe0/90h12/VsLEouDmIyBh2D676
=s+w0
-----END PGP SIGNATURE-----

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