top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

In tomcat does the no . of open sockets on http port is it equal to number of threads in use in tomcat .

+1 vote
143 views

In tomcat does the no . of open sockets on http port (netstat -anlp|grep 8080) is it equal to number of threads in use in tomcat .
Actually I want to understand how & when I can say that the all threads in a tomcat are fully utilized that why it is responding slow.

posted Jun 16, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

We have a set up like Apahce (80,443) redirects the request to Tomcat (8080) using mod_jk.

The new requirement is to route the request from the same apache to another tomcat (8090). Hence I made the different config file for apache with different ports (86,4444) and different worker for mod_jk which routes the request to tomcat.

Now the issue is when I hit the url http://:86 and after providing the credentials, it is redirecting to https://:86 and throwing the below error.

Error in browser:

Secure Connection Failed

An error occurred during a connection to x.x.x.x:86. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)

Error in logs:

"x16x03x01" 501

[Thu Jan 08 08:22:46 2015] [debug] ssl_engine_io.c(1523): OpenSSL: I/O error, 11 bytes expected to read on BIO#1bf568 [mem: 1f3930]
[Thu Jan 08 08:22:46 2015] [debug] ssl_engine_kernel.c(1806): OpenSSL: Exit: error in SSLv2/v3 read client hello A
[Thu Jan 08 08:22:46 2015] [info] (70014)End of file found: SSL handshake interrupted by system [Hint: Stop button pressed in browser?!]
[Thu Jan 08 08:22:46 2015] [info] Connection to child 3 closed with abortive shutdown(server pritoolvca1.sw.ericsson.se:443 [2], client 153.88.164.216)
[Thu Jan 08 08:23:53 2015] [error] [client 172.17.136.153] Invalid method in request x16x03x01

Could you please suggest where it might went wrong and the way forward..

+1 vote

I had installed tomcat 8 port 80 on Amazon AWS EC2, but netstat, fuser does show me tomcat on port 80. Browser gives 404 error and connection refused. I wrote to Amazon support for the misery...

+2 votes
in mycase of tomcat error on ubuntu 14.04 too many files open, 
even though limit is 8096, proc limit says 4096. why ? any body?          
ranjan@ubuntu:~$ cat /proc/22897/limits          
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds     
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             56045                56045                processes     
Max open files            4096                 4096                 files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       56045                56045                signals     
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0     
Max realtime priority     0                    0    
Max realtime timeout      unlimited            unlimited            us     
ranjan@ubuntu:~$ sysctl -a |grep file     
sysctl: permission denied on key 'fs.protected_hardlinks'     
sysctl: permission denied on key 'fs.protected_symlinks'     
fs.file-max = 1426057     fs.file-nr = 8096       0       1426057     
sysctl: permission denied on key 'kernel.cad_pid'     
fs.xfs.filestream_centisecs = 3000     
0 votes

When a request comes to tomcat and tomcat does not have any free thread available or all the threads are busy and request queue is also full then where I need to write the logic for redirect the request to some other server.

I have ConnectionRedirectionValve.java already written but in that file the request redirection logic is handled when threads are not sufficient at application level means application inside tomcat do not have any spare semaphore that is handled in this file.

Even though when tomcat does not have sufficient threads then I do not think the flow will move to ConnectionRedirectionValve.java So please suggest how to handle this

+3 votes

I have a requirement where the tomcat load has to be managed by tuning the following parameters.

--> Limit the number of user requests at Apache level that are routed to Tomcat server.
--> Track the number of processed requests and the requests that are queued at Apache level.

Any suggestions?

...