I bet your traffic has increase enough that hitting your limit. I implemented a web app at the beginning of this year and I eventually had to increase maximum for everything as our usage increased.
Randall -----Original Message----- From: Shawn Wilson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 10:46 AM To: Tomcat Users List Subject: Re: mod_jk hangs Looks like the maximum for everyting in my config was 150 so I'll try setting maxSpareThreads for Tomcat to 150 as well. If this is indeed the cause of the problem, any idea why it would just start happening yesterday after months without problem? My only guess is that perhaps we just happened to reach some threshold of traffic yesterday that we never did before. Actually, that may indeed be the case since we usually get a surge of traffic during the beginning of a month. Thanks, -shawn Randall Svancara wrote: > Well, that depends on what platform and how apache was compiled. As I > understand on windows, apache uses the mpm modules and unix it uses > forking or it can use mpm. You need to find the section for you > platform and make the ajustments as neccessary. Below is the section > where you need to look in your apache configuration file, usually called > httpd.conf, but i have seen them named apache.conf (gentoo anyone). But > you can see the min and max spare servers/threads listed in each > section. Just adjust accordingly. > > I hope this helps. > > > > <IfModule prefork.c> > StartServers 75 > MinSpareServers 75 > MaxSpareServers 300 > MaxClients 300 > MaxRequestsPerChild 0 > </IfModule> > > # worker MPM > # StartServers: initial number of server processes to start > # MaxClients: maximum number of simultaneous client connections > # MinSpareThreads: minimum number of worker threads which are kept spare > # MaxSpareThreads: maximum number of worker threads which are kept spare > # ThreadsPerChild: constant number of worker threads in each server > process > # MaxRequestsPerChild: maximum number of requests a server process > serves > <IfModule worker.c> > StartServers 75 > MaxClients 300 > MinSpareThreads 75 > MaxSpareThreads 300 > ThreadsPerChild 25 > MaxRequestsPerChild 0 > </IfModule> > > # perchild MPM > # NumServers: constant number of server processes > # StartThreads: initial number of worker threads in each server process > # MinSpareThreads: minimum number of worker threads which are kept spare > # MaxSpareThreads: maximum number of worker threads which are kept spare > # MaxThreadsPerChild: maximum number of worker threads in each server > process > # MaxRequestsPerChild: maximum number of connections per server process > <IfModule perchild.c> > NumServers 75 > StartThreads 75 > MinSpareThreads 75 > MaxSpareThreads 300 > MaxThreadsPerChild 20 > MaxRequestsPerChild 0 > </IfModule> > > # WinNT MPM > # ThreadsPerChild: constant number of worker threads in the server > process > # MaxRequestsPerChild: maximum number of requests a server process > serves > <IfModule mpm_winnt.c> > ThreadsPerChild 250 > MaxRequestsPerChild 0 > </IfModule> > > > > > > > -----Original Message----- > From: Shawn Wilson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 05, 2004 10:21 AM > To: Tomcat Users List > Subject: Re: mod_jk hangs > > > Okay, here is the section from our server.xml in production: > > <Service name="Catalina"> > <Connector port="8080" /> > > <!-- This is here for compatibility only, not required --> > <Connector port="8090" protocol="AJP/1.3" /> > > <Engine name="Catalina" defaultHost="localhost" jvmRoute="ajp13_0"> > <Logger className="org.apache.catalina.logger.FileLogger" /> > > <Realm className="org.apache.catalina.realm.UserDatabaseRealm" > resourceName="UserDatabase" /> > > <Host name="localhost" appBase="webapps" /> > </Engine> > </Service> > > I thought it interesting the comment that "this is here for > compatibility only, not required." It sounds to me that connector is > required if I want AJP/1.3 isn't it? I can't remember if that comment > was there or if I (mistakingly) added it. Anyways, I see that I could > probably do well to add the minSpareThreads and maxSpareThreads > parameters. Any idea where I should look in my httpd.conf file to see > what values to set these to? > > Thanks, > -shawn > > Randall Svancara wrote: > > >>You might want to check to make sure you have enough tomcat threads > > for > >>each apache thread. >> >>I usually give tomcat a few more threads than apache just to make sure > > I > >>do not run out. >> >>-------snip---------------- >> >> <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --> >> <Connector port="8009" >> enableLookups="false" redirectPort="8443" debug="0" >> minSpareThreads="100" maxSpareThreads="300" >> protocol="AJP/1.3" /> >>-------snip---------------- >> >>So you might want to increase min and max spare threads to accomodate >>more requestes from apache to tomcat via mod_jk. >> >>Randall >> >> >> >>-----Original Message----- >>From: Shawn Wilson [mailto:[EMAIL PROTECTED] >>Sent: Wednesday, May 05, 2004 9:50 AM >>To: [EMAIL PROTECTED] >>Subject: mod_jk hangs >> >> >>Just yesterday we started running into problems requesting pages on > > our > >>production website through mod_jk. Previously everything had been >>working fine for months. Essentially what happens is when you request >>the page for the first time (doesn't seem to matter what browser > > you're > >>using) the browser just sits and spins. Then after hitting refresh >>(Ctrl+R) a couple times it finally comes up. Subsequent visits to the >>same page continue to work for me in Mozilla but after closing IE and >>reopening it after a couple more requests it hangs again. In case it >>helps, the site in question is http://www.atmreports.com. >> >>I simply cannot figure out what is going on. I do see many errors in > > the > >>mod_jk.log, but these had been there before when everything worked > > fine > >>too: >> >>[Wed May 05 09:27:46 2004] [jk_ajp_common.c (1137)]: Error reading >>reply from tomcat. Tomcat is down or network problems. >>[Wed May 05 09:27:46 2004] [jk_ajp_common.c (1290)]: ERROR: Receiving > > >>from tomcat failed, recoverable operation. err=0 >>[Wed May 05 09:27:46 2004] [jk_ajp_common.c (1309)]: sending request > > to > >>tomcat failed in send loop. err=0 >>[Wed May 05 09:27:46 2004] [jk_ajp_common.c (738)]: ERROR: can't >>receive the response message from tomcat, network problems or tomcat > > is > >>down. err=-1 >> >>A few things to note, any of which may contribute to the problem but > > for > >>the life of me I can't figure out how: >> >>1. On Friday we just moved out datacenter to a new location. However > > we > >>see this problem even internally at the location so I don't believe it > > >>is any sort of routing issue (and the problem didn't start until >>Tuesday). >> >>2. The clock on this webserver was many hours off. On Tuesday (yes, > > the > >>day the problems started) the clock was synchronized and the timezone >>correctly set so the machine now has correct time. This seems to be > > the > >>most probable cause simply because it happened around the same time, > > but > >>I just can't understand why or how. >> >>3. Yesterday we rebooted the box to see if that would help. It did. We > > >>didn't have any more problems at all that day until this morning we > > see > >>the problems again. Today we recycled just tomcat and that seems to > > have > >>fixed it as well, though I expect that by tomorrow I will see the >>problem again. >> >>4. I wouldn't think this could have anything to do with that new > > Sasser > >>worm, but listing that just in case. >> >>The machine is running Linux kernel 2.4.20-8 with httpd-2.0.40-21 and >>jakarta-tomcat-5.0.18. We are running 4 instances of tomcat on the > > box, > >>each started with the following JVM options: >> >> -Xmn128M -Xmx1024M -Djava.awt.headless=true >> >>Nothing having to do with configuration has changed at all in a long >>time. Here is the relevant configuration sections: >> >> >># Mod_jk (Tomcat connector) >>LoadModule jk_module modules/mod_jk.so >> >><IfModule mod_jk.c> >> JkWorkersFile /etc/httpd/conf/workers.properties >> JkLogFile /var/log/httpd/mod_jk.log >> JkLogLevel info >> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " >> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories >> JkRequestLogFormat "%w %V %T" >></IfModule> >> >>...and later (in a <VirtualHost> section)... >> >> JKMount /myreports balancer >> JKMount /myreports/* balancer >> >>Here is our workers.properties file (comments removed): >> >>workers.java_home=/usr/java/j2sdk1.4.2_03 >>ps=/ >>worker.list=balancer >> >>worker.ajp13_0.port=8090 >>worker.ajp13_0.host=localhost >>worker.ajp13_0.type=ajp13 >>worker.ajp13_0.lbfactor=1 >> >>worker.ajp13_1.port=8091 >>worker.ajp13_1.host=localhost >>worker.ajp13_1.type=ajp13 >>worker.ajp13_1.lbfactor=1 >> >>worker.ajp13_2.port=8092 >>worker.ajp13_2.host=localhost >>worker.ajp13_2.type=ajp13 >>worker.ajp13_2.lbfactor=1 >> >>worker.ajp13_3.port=8093 >>worker.ajp13_3.host=localhost >>worker.ajp13_3.type=ajp13 >>worker.ajp13_3.lbfactor=1 >> >>worker.balancer.type=lb >>worker.balancer.balanced_workers=ajp13_0, ajp13_1, ajp13_2, ajp13_3 >>worker.balancer.sticky_session=1 >> >> >>Any help would be greatly appreciated! >> >>Thanks, >>-shawn >> > > -- ==================================== Shawn Wilson [EMAIL PROTECTED] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 ==================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
