• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat Connector Question

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am having a problem with Tomcat6 where I cannot open more connections to the server than execute threads. My understanding is that the Listener/Acceptor is supposed to be able to manage the connections to the server and pass off the requests to the execute threads and therefore I should be able to have 100's of connections open.

Here is the current configuration of my connector:

<Connector port="8080" address="${jboss.bind.address}" maxThreads="80" maxHttpHeaderSize="8192" emptySessionPath="true" protocol="HTTP/1.1" enableLookups="false" redirectPort="8443" acceptCount="500" compression="on" compressableMimeType="text/html,text/xml,text/css,text/plain,application/x-javascript,text/javascript" connectionTimeout="20000" disableUploadTimeout="true" server="Tomcat Server 6" />


With this configuration I seemingly can only have ~60 connections open to the server at any one time.. When the server is loaded up to 60 connections, it closes the connection after every request.


Does anyone know why this happens?
Any feedback is appreciated.

Thank you


 
Quintin Paulson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Quintin Paulson wrote:
I am having a problem with Tomcat6 where I cannot open more connections to the server than execute threads. My understanding is that the Listener/Acceptor is supposed to be able to manage the connections to the server and pass off the requests to the execute threads and therefore I should be able to have 100's of connections open.

Here is the current configuration of my connector:

<Connector port="8080" address="${jboss.bind.address}" maxThreads="80" maxHttpHeaderSize="8192" emptySessionPath="true" protocol="HTTP/1.1" enableLookups="false" redirectPort="8443" acceptCount="500" compression="on" compressableMimeType="text/html,text/xml,text/css,text/plain,application/x-javascript,text/javascript" connectionTimeout="20000" disableUploadTimeout="true" server="Tomcat Server 6" />


With this configuration I seemingly can only have ~60 connections open to the server at any one time.. When the server is loaded up to 60 connections, it closes the connection after every request.


Does anyone know why this happens?
Any feedback is appreciated.

Thank you




I figured out the problem.. Since the default HTTP/1.1 connector is blocking, it requires a thread per socket.. This is very limiting, as the default connector does not scale well ( at least with the application I am deploying ).
For those who are not using Apache for static content I highly highly suggest switching out the connector to NIO or AJP. When using the NIO or AJP connectors you will not have this limitation. It is however trickier to tune them...


 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic