You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Benjamin Cuthbert <be...@db.com> on 2005/12/13 18:21:27 UTC

Too many sockets on mod_jk

All

I have an apache 1.3.37 and mod_jk 1.2.12 setup . When my apache connects 
to my Jboss tomcat server i see about 90 open socket connections.

Is there a way to track how many sockets get opened in mod_jk, as this is 
happening for each client that logs onto the application, so if i get 
about 30 i get
about 500 sockets from my apache server.

Regards

Ben Cuthbert
Deutsche Bank - Global Markets
TISO / Arch Global Finance / Prime Services
PGP: http://pgp.mit.edu

+44 (0) 20 754 76389 (Tel)
+44 (0) 20 754 74996 (Fax)

Re: Too many sockets on mod_jk

Posted by Mladen Turk <ml...@jboss.com>.
Benjamin Cuthbert wrote:
> All
> 
> I have an apache 1.3.37 and mod_jk 1.2.12 setup . When my apache connects 
> to my Jboss tomcat server i see about 90 open socket connections.
> 
> Is there a way to track how many sockets get opened in mod_jk, as this is 
> happening for each client that logs onto the application, so if i get 
> about 30 i get
> about 500 sockets from my apache server.
> 

The number of sockets opened at any time to the backend Tomcat
depends on your Apache httpd settings.
Since you are using prefork model (although I don't know from where
have you obtained 1.3.37, since the latest one is 1.3.34) each
child will open a single connection to Tomcat. So if you have
MaxClients 500 in your httpd.conf up to 500 connections could
be established (no mater what the concurrent load is).
Since there are 90 initial connections opened you have probably
set StartServers 90.

Anyhow, make sure that you match the number of allowed connections
either by lowering the MaxClients or rising the maxThreads in
Tomcat's server.xml.

Further more if you set MaxRequestsPerChild (> 0) then you will
need to add the connectionTimeout to the server.xml if using
Tomcat 5.x, because when the child is recycled your existing
connection will stay half-closed and new one will be created,
thus rising the total number of connections and threads until
the Tomcat becomes unresponsive.


Regards,
Mladen.

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