Hi Bhaskar,

When sending to this list please prefix the subject with the name of the
specific commons project you're talking about (as I've done above). It's
the [daemon] project that provides the jsvc utility program.



On Thu, 2006-07-20 at 17:13 +0530, bhaskar wrote:
> I am using JSVC to make tomcat 5.0.18 (using JDK 1.4.2_07) to listen in port
> 4080 and 443 on RHEL (Red Hat Enterprise Linux AS release 4 (Nahant Update
> 2).
>  
> In netstat -s output, i notice:
>  391808 times the listen queue of a socket overflowed
> 
> Sometimes during the loads, tomcat gets into frozen state. I have taken the
> proc status of jsvc and posted in the below thread:
>  
>  <http://www.linuxquestions.org/questions/showthread.php?t=457517>
> http://www.linuxquestions.org/questions/showthread.php?t=457517 
> 
> Under normal loads, i noticed that overflow count keep growing.
>  
> Are there any known issues/bugs with JSVC to get into this situation?

It looks like there are two separate issues here:
(a) "listen queue of a socket overflowed", and
(b) tomcat appears to have hung (not responding on one particular port)

Re (a):

Under unix, a server ("listening") socket has a maximum number of
connections that can be waiting for the program to accept. As the unix
kernel receives connection requests it places them on a queue; as the
server program accepts them they are removed from the queue. If the
queue builds up beyond the max queue length then the unix kernel refuses
new connections. I presume that is what you are seeing. I guess that the
clients (browsers) will get the "cannot connect to site" type message in
this case. Of course the number grows over time; it would only reset
when tomcat closes its listening socket, ie when tomcat is restarted.

It's not the daemon (ie jsvc) process that manages listening on a socket
for incoming connections; it's tomcat that does that. I therefore
recommend that you ask on the tomcat list about this.

The java ServerSocket class has a constructor:
  ServerSocket(int port, int backlog)
I presume you're looking to configure Tomcat to increase that "backlog"
parameter so the unix kernel will queue more connection requests until
tomcat gets around to dealing with them. I don't know where or if tomcat
has a config option to control this.

Of course there is no point telling the kernel to queue more requests if
your tomcat instance is so heavily loaded that it can't service them. If
you have very "bursty" traffic, where you get lots of connections over a
few seconds, then nothing for a while, then this may help (tomcat will
eventually catch up with the workload). But otherwise, this may just
indicate that your system doesn't have enough capacity for the load it
is serving in which case increasing the backlog will not help.

Note that I'm not an expert on tomcat; this is just general unix socket
advice. Check tomcat documentation or ask on the tomcat user list for
more details.

Re (b), I have no idea. Again, this appears to be a Tomcat issue rather
than a jsvc (daemon) issue. Please ask on the Tomcat list.


Regards,

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to