Running heavily loaded tomcat sites.
Hello, I have collected my experiences with running a heavily loaded (and soon to be high availability) tomcat setup in a paper available here: http://brandlay.com/wojtek/publ/tomcat.jsp Have a look if you're interested and please email any comments directly to my email. Thanks! -- Wojciech Sobczuk [EMAIL PROTECTED] +48 605 607 170 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Production configuration
Hello, I'm running a production server currently with Tomcat 5.0.19 (should I upgrade?) serving 200-300 thousand hits per day (and increasing). I'm curious what kind of configurations you are using (server.xml, web.xml, JVM parameters) for your production deployments. And what should be changed in my configuration in order to make it more robust/stable/etc. Mine are: server.xml Connector port=8080 maxThreads=150 minSpareThreads=15 maxSpareThreads=45 enableLookups=false acceptCount=100 debug=0 connectionTimeout=1 disableUploadTimeout=true / web.xml servlet servlet-namejsp/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namedevelopment/param-name param-valuefalse/param-value /init-param init-param param-namefork/param-name param-valuetrue/param-value /init-param init-param param-namexpoweredBy/param-name param-valuefalse/param-value /init-param init-param param-nametagpoolMaxSize/param-name param-value10/param-value /init-param load-on-startup3/load-on-startup /servlet and JVM parameters: -Xincgc -Xmx256m -server Best regards, Wojtek -- Wojciech Sobczuk [EMAIL PROTECTED] +48 501 456 923 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat having strange 'hickups'
It is possible. Any nice website about tuning the garbage collector? How to make it so it seamlessly works in the background and does not halt the whole server? Best reagards, Wojtek Michiel Toneman wrote: Are you sure this isn't related to heavy garbage collection in the JVM? jvmstat has some good tools to monitor memory usage an garbage collection in your app. Michiel Wojciech Sobczuk wrote: Hello, I'm running Tomcat 5.0.18 on RedHat 9, started with the following commandline: /usr/java/j2sdk1.4.2_01//bin/java -Xmx256m -server -Djava.endorsed.dirs=/usr/java/jakarta-tomcat/common/endorsed -classpath /usr/java/j2sdk1.4.2_01//lib/tools.jar:/usr/java/jakarta-tomcat/bin/bootstrap.jar:/usr/java/jakarta-tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/java/jakarta-tomcat -Dcatalina.home=/usr/java/jakarta-tomcat -Djava.io.tmpdir=/usr/java/jakarta-tomcat/temp org.apache.catalina.startup.Bootstrap start and with development=false and fork=true in the jsp servlet configuration. This installation is serving around 20 hits per day, much of it is DB intensive. Before i set development=false and fork=true I had big hangups when I changed the JSPs and Tomcat started recompiling them - the whole engine practically stopped for a few minutes and the load went up to 16 on the server. Now development and fork variables are set correctly for deployment, but I am still having a strange problem. Every now and then (probably every few hours, I can't tell exactly) Tomcat stops for around 20 seconds. I noticed it when browsing one of my sites, everything was working fast, and then at a certain point, after I clicked on a link, the browser started connecting to the server and waited for the response for a long time. When I checked the load on the box it was 1-2 (normally it's 0.5), but didn't notice any processes hogging the CPU with 'top'. I already fixed all DB connection leaks I had so that can't be the issue here. Traffic peaks can't be it either, I have constant traffic. I know that this isn't a precise description of the error I'm encountering but I don't have any more information at this point. I'm hoping that someone encountered this already and can help me, or perhaps you can give me directions how to figure out what's wrong. Best regards, W. Sobczuk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wojciech Sobczuk [EMAIL PROTECTED] +48 501 456 923 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat having strange 'hickups'
Hello, I'm running Tomcat 5.0.18 on RedHat 9, started with the following commandline: /usr/java/j2sdk1.4.2_01//bin/java -Xmx256m -server -Djava.endorsed.dirs=/usr/java/jakarta-tomcat/common/endorsed -classpath /usr/java/j2sdk1.4.2_01//lib/tools.jar:/usr/java/jakarta-tomcat/bin/bootstrap.jar:/usr/java/jakarta-tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/java/jakarta-tomcat -Dcatalina.home=/usr/java/jakarta-tomcat -Djava.io.tmpdir=/usr/java/jakarta-tomcat/temp org.apache.catalina.startup.Bootstrap start and with development=false and fork=true in the jsp servlet configuration. This installation is serving around 20 hits per day, much of it is DB intensive. Before i set development=false and fork=true I had big hangups when I changed the JSPs and Tomcat started recompiling them - the whole engine practically stopped for a few minutes and the load went up to 16 on the server. Now development and fork variables are set correctly for deployment, but I am still having a strange problem. Every now and then (probably every few hours, I can't tell exactly) Tomcat stops for around 20 seconds. I noticed it when browsing one of my sites, everything was working fast, and then at a certain point, after I clicked on a link, the browser started connecting to the server and waited for the response for a long time. When I checked the load on the box it was 1-2 (normally it's 0.5), but didn't notice any processes hogging the CPU with 'top'. I already fixed all DB connection leaks I had so that can't be the issue here. Traffic peaks can't be it either, I have constant traffic. I know that this isn't a precise description of the error I'm encountering but I don't have any more information at this point. I'm hoping that someone encountered this already and can help me, or perhaps you can give me directions how to figure out what's wrong. Best regards, W. Sobczuk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem
hello, i have an applicAtion called shop, deployed in tomcat webapps (it has a context configured in server.xml too). i'm having the following problems with tomcat 3.2.3: - tomcat doesn't see classes which i place in webapps/shop/WEB-INF/lib, to be precise, i place a .jar there in which there is a class which is the parent class of all my servlets - when i try to execute a servlet i geta java.lang.NoClassDefFoundError exception and it fails. - the strange thing is that the error above occurs randomly, and sometimes it happens that tomcat reads those classes ? and when it does, another problem occurs. i'm using tomcat with jboss 2.2.2, which serves as the EJB container. now when i try to fetch an EJB, i get a failure in the InitialContext.lookup method, with another NoClassDefFound - this time it can't find the Home interface of my bean, which is nicely placed in shop/WEB-INF/classes and again, this error sometimes doesn't occur and it works... yes, i did check the classes' package names, etc. etc. i'm running redhat 7.1 with 2.4.9 kernel and jdk 1.3.1 for linux. any idea what might be causing my problems? i'm totally clueless.. please reply to this email too, i'm not subscribed to the group. greetings, Wojciech Sobczuk