Christopher, Thank you for this fast answer !
Ok for all versions upgrades, I put it in my todo list ! It is a customer environment, I can't make it immediately. >> My VirtualHost : >> >> [...] JkMount /* ajp13 [...] > > Do you have anything else? If not, why bother with Apache httpd? Yes, we have lot of directives (using mod_cache, mod_proxy, ...). In reality, I have about twenty VirtualHost. >> [...] <!-- Define an AJP 1.3 Connector on port 8011 --> <Connector >> port="8011" enableLookups="false" redirectPort="8443" debug="0" >> maxThreads="600" keepAlive="true" backlog="8192" >> minSpareThreads="25" maxSpareThreads="250" >> connectionTimeout="600000" protocol="AJP/1.3" /> [...] > > That's a huge backlog, especially when you always expect a certain > maximum number of connections coming from Apache httpd. Ok for "backlog". I delete it as soon as possible. >> worker.properties : >> >> # define worker worker.list=ajp13 >> >> # Set properties for ajp13 => tomcat worker.ajp13.type=ajp13 >> worker.ajp13.host=localhost worker.ajp13.port=8011 >> worker.ajp13.connection_pool_size=1200 >> worker.ajp13.connection_pool_timeout=600 >> worker.ajp13.socket_keepalive=true worker.ajp13.socket_timeout=600 > > What MPM are you using? If you are using prefork, then your > connection_pool_size is all wrong. Generally speaking, you should > allow mod_jk to determine its own value for connection_pool_size when > using Apache httpd. > > How many backend Tomcat servers do you have? Looks like one. > > Let's assume you are using threaded MPM in httpd (otherwise the value > for 1200 is insane) and you are using only one backend Tomcat server. > > You have 1200 connections configured in httpd (connection_pool_size), > but Tomcat can only accept 600 of them (maxThreads) at any given time. > You have used backlog=8192 to cover this up so things become even more > confusing. I using prefork. Indeed, in Apache documentation : "Do not use connection_pool_size with values higher then 1 on Apache 2.x prefork or Apache 1.3.x!". It's better to delete it or to put its value to 1 ? What problems can arise with mpm prefork and connection_pool_size > 1 ? >> Usually, it's work correctly, but sometime, only on certain pages, >> woker can't connect to Tomcat. In my logs files, I have : > > I think it's only a coincidence that /page2 consistently gives you > 500-response errors, here. Try looking at a wider section of your > httpd access log to determine if there really is something special > about /page2 (of course, /page2 could be returning 500-response > itself: you might want to check on that). This page was in error 500 in acces log between 19:12:27 and 20:04:39. >> How can we explain this behavior ? > > There are lots of explanations for what you are seeing. > > A few questions: > > 1. Do you really need Apache httpd at all? > 2. Can you configure cping/cpong for connection liveness testing? > 3. Have you tried disabling AJP connection re-use altogether? > localhost communication is fast fast fast. 1 - Yes :) 2 - Yes, but not immediately 3 - I don't, but I am going to test ! Thank you ! 2012/9/20 Christopher Schultz <ch...@christopherschultz.net>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Nicolas, > > On 9/20/12 10:37 AM, Nicolas Sarazin wrote: >> English is not my native language, please excuse typing errors. > > Welcome! > >> I met a problem which I do not manage to explain... >> >> My environment (one server) : >> >> Server version : Apache Tomcat/5.5.26 > > You have 10 days to upgrade, at which point you will be flying without > a parachute: Apache support for Tomcat 5.5.x expires in 10 days. I > highly recommend that you get Tomcat 7 or at least Tomcat 6 into your > test environments ASAP. > >> JVM Version : 1.6.0_06-b02 > > You could afford to upgrade that, too. Oracle is on 1.6.0_35. > >> Web server version : Apache/2.2.21 (Unix) mod_jk/1.2.32 > > 2.2.23 and 1.2.37 > >> My VirtualHost : >> >> [...] JkMount /* ajp13 [...] > > Do you have anything else? If not, why bother with Apache httpd? > >> [...] <!-- Define an AJP 1.3 Connector on port 8011 --> <Connector >> port="8011" enableLookups="false" redirectPort="8443" debug="0" >> maxThreads="600" keepAlive="true" backlog="8192" >> minSpareThreads="25" maxSpareThreads="250" >> connectionTimeout="600000" protocol="AJP/1.3" /> [...] > > That's a huge backlog, especially when you always expect a certain > maximum number of connections coming from Apache httpd. > >> worker.properties : >> >> # define worker worker.list=ajp13 >> >> # Set properties for ajp13 => tomcat worker.ajp13.type=ajp13 >> worker.ajp13.host=localhost worker.ajp13.port=8011 >> worker.ajp13.connection_pool_size=1200 >> worker.ajp13.connection_pool_timeout=600 >> worker.ajp13.socket_keepalive=true worker.ajp13.socket_timeout=600 > > What MPM are you using? If you are using prefork, then your > connection_pool_size is all wrong. Generally speaking, you should > allow mod_jk to determine its own value for connection_pool_size when > using Apache httpd. > > How many backend Tomcat servers do you have? Looks like one. > > Let's assume you are using threaded MPM in httpd (otherwise the value > for 1200 is insane) and you are using only one backend Tomcat server. > > You have 1200 connections configured in httpd (connection_pool_size), > but Tomcat can only accept 600 of them (maxThreads) at any given time. > You have used backlog=8192 to cover this up so things become even more > confusing. > >> Usually, it's work correctly, but sometime, only on certain pages, >> woker can't connect to Tomcat. In my logs files, I have : > > I think it's only a coincidence that /page2 consistently gives you > 500-response errors, here. Try looking at a wider section of your > httpd access log to determine if there really is something special > about /page2 (of course, /page2 could be returning 500-response > itself: you might want to check on that). > >> At the beginning, I thought that the problem came from a bad >> configuration here : In server.xml file : maxThreads="600" In >> worker.properties : worker.ajp13.connection_pool_size=1200 >> >> But at the present time, there was no overload on the servers. > > You should really get your connection allocations straightened-out, > even if you don't expect them to be a problem. If you expect 1200 > connections from httpd, then set maxThreads=1200 in Tomcat. I see you > have the same timeout values for both sides of the connection (good!). > You don't need that insanely-high TCP backlog, so remove that, too. > >> How can we explain this behavior ? > > There are lots of explanations for what you are seeing. > > A few questions: > > 1. Do you really need Apache httpd at all? > 2. Can you configure cping/cpong for connection liveness testing? > 3. Have you tried disabling AJP connection re-use altogether? > localhost communication is fast fast fast. > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG/MacGPG2 v2.0.17 (Darwin) > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ > > iEYEARECAAYFAlBbOikACgkQ9CaO5/Lv0PDhEwCfdEvr3VNpF/IEUvNlEzKD6qzN > 1AsAoMQKM5BJXP/6etm2MsPbL3H32OOu > =02al > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org