Re: Server.xml optimization question.
Hi, I believe you have read: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html and by configuring one value at the time. It takes some time to be done. I think you can't create a common how-to configure your tomcat because people uses tomcat in various solutions. - Jouko Johansson Mufaddal Khumri wrote: Hi, I have got the following connector in my server.xml file: Connector port=9090 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / I am trying to do some performance tune up and would like to see the effects of changing values of the attributes above. Are there any comprehensive webpages, documents regarding how to optimize the performance of your webapp by tweaking the server.xml parameters available somewhere? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: high server load
I configured the fork-setting to true and the load went down from 10 to 1.5 so the configuration helped a lot. Also the server availibility was enhanced. Is there still another configuration parameter which could decrease the load under 1.0 or do we need to buy better hardware ;) So thank you for your help, Jouko Shapira, Yoav wrote: Hi, It's kind of hard to help with a non-existent tomcat version ;) Do things improve if you set fork to true for your JSP servlet? Tomcat 4 and 5 have different memory models, different optimization, etc, so the performance characteristics for the same app under the same load will not be the same between them. They should be better in tomcat 5, of course. Yoav Shapira Millennium Research Informatics -Original Message- From: Jouko Johansson [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 6:18 AM To: Tomcat Users List Subject: high server load Hi, I have experienced some problems while testing the tomcat 5.0.28 on linux. After the restart the tomcat is running without any problems. After 3 to 4 hours the server load starts to increase. Even though the server load is very high (30), the tomcat response time is very good. I assume that there is a some kind of problem with background thread which increases the load because the server still provides the service. I have decreased the server load to 10 with configuring the maxSpareThread-value to same as maxThreads-value. The server handles about 10-20 req/sec, so maybe the maxThreads-value is too high. The same web application is running fluently with version 4.0.6 on another application server. The garbage collection takes about 0.1 secs to complete and full garbage collection takes about 1-2 seconds. The running java process count is 222. I included changes to the configuration files which I have done: System information: Linux 2.4.18 #1 Fri May 17 17:08:04 EEST 2002 java version 1.4.2_03 tomcat 5.0.28 I have added following lines to catalina.sh : ulimit -s 2048 # suggested on Release-notes JAVA_OPTS=-Xms512M -Xmx1024M -server -verbose:gc # provide more memory and inform about the garbage collection export LD_ASSUME_KERNEL=2.2.5 # suggested on Release-notes server.xml looks like this: Connector port=8080 maxThreads=200 minSpareThreads=100 maxSpareThreads=200 enableLookups=false redirectPort=8443 acceptCount=75 debug=0 connectionTimeout=2 proxyPort=80 proxyName=www.our_service_name.com disableUploadTimeout=false / Context path= docBase=/doc/path debug=0 reloadable=false liveDeploy=false swallowOutput=false / web.xml looks like this: servlet servlet-namejsp/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namefork/param-name param-valuefalse/param-value /init-param init-param param-namexpoweredBy/param-name param-valuefalse/param-value /init-param init-param param-nameenablePooling/param-name param-valuefalse/param-value /init-param load-on-startup3/load-on-startup /servlet I am running out of configuration ideas so I hope somebody could provide information about the load problem Yours, - Jouko --- Jouko Johansson software engineer Infosto Oy / SanomaWSOY konserni Pyhäranta 7, 33211 Tampere, Finland Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- --- Jouko Johansson software engineer Infosto Oy / SanomaWSOY konserni Pyhäranta 7, 33211 Tampere, Finland Email: [EMAIL PROTECTED] Puh : +358 3 2524 525 Mob :+358 40 578 57 58 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
high server load
Hi, I have experienced some problems while testing the tomcat 5.0.28 on linux. After the restart the tomcat is running without any problems. After 3 to 4 hours the server load starts to increase. Even though the server load is very high (30), the tomcat response time is very good. I assume that there is a some kind of problem with background thread which increases the load because the server still provides the service. I have decreased the server load to 10 with configuring the maxSpareThread-value to same as maxThreads-value. The server handles about 10-20 req/sec, so maybe the maxThreads-value is too high. The same web application is running fluently with version 4.0.6 on another application server. The garbage collection takes about 0.1 secs to complete and full garbage collection takes about 1-2 seconds. The running java process count is 222. I included changes to the configuration files which I have done: System information: Linux 2.4.18 #1 Fri May 17 17:08:04 EEST 2002 java version 1.4.2_03 tomcat 5.0.28 I have added following lines to catalina.sh : ulimit -s 2048 # suggested on Release-notes JAVA_OPTS=-Xms512M -Xmx1024M -server -verbose:gc # provide more memory and inform about the garbage collection export LD_ASSUME_KERNEL=2.2.5 # suggested on Release-notes server.xml looks like this: Connector port=8080 maxThreads=200 minSpareThreads=100 maxSpareThreads=200 enableLookups=false redirectPort=8443 acceptCount=75 debug=0 connectionTimeout=2 proxyPort=80 proxyName=www.our_service_name.com disableUploadTimeout=false / Context path= docBase=/doc/path debug=0 reloadable=false liveDeploy=false swallowOutput=false / web.xml looks like this: servlet servlet-namejsp/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namefork/param-name param-valuefalse/param-value /init-param init-param param-namexpoweredBy/param-name param-valuefalse/param-value /init-param init-param param-nameenablePooling/param-name param-valuefalse/param-value /init-param load-on-startup3/load-on-startup /servlet I am running out of configuration ideas so I hope somebody could provide information about the load problem Yours, - Jouko --- Jouko Johansson software engineer Infosto Oy / SanomaWSOY konserni Pyhäranta 7, 33211 Tampere, Finland Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: high server load
Oops! The tomcat version is 5.0.25. :-[ I try to configure to fork. - Jouko Shapira, Yoav wrote: Hi, It's kind of hard to help with a non-existent tomcat version ;) Do things improve if you set fork to true for your JSP servlet? Tomcat 4 and 5 have different memory models, different optimization, etc, so the performance characteristics for the same app under the same load will not be the same between them. They should be better in tomcat 5, of course. Yoav Shapira Millennium Research Informatics -Original Message- From: Jouko Johansson [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 6:18 AM To: Tomcat Users List Subject: high server load Hi, I have experienced some problems while testing the tomcat 5.0.28 on linux. After the restart the tomcat is running without any problems. After 3 to 4 hours the server load starts to increase. Even though the server load is very high (30), the tomcat response time is very good. I assume that there is a some kind of problem with background thread which increases the load because the server still provides the service. I have decreased the server load to 10 with configuring the maxSpareThread-value to same as maxThreads-value. The server handles about 10-20 req/sec, so maybe the maxThreads-value is too high. The same web application is running fluently with version 4.0.6 on another application server. The garbage collection takes about 0.1 secs to complete and full garbage collection takes about 1-2 seconds. The running java process count is 222. I included changes to the configuration files which I have done: System information: Linux 2.4.18 #1 Fri May 17 17:08:04 EEST 2002 java version 1.4.2_03 tomcat 5.0.28 I have added following lines to catalina.sh : ulimit -s 2048 # suggested on Release-notes JAVA_OPTS=-Xms512M -Xmx1024M -server -verbose:gc # provide more memory and inform about the garbage collection export LD_ASSUME_KERNEL=2.2.5 # suggested on Release-notes server.xml looks like this: Connector port=8080 maxThreads=200 minSpareThreads=100 maxSpareThreads=200 enableLookups=false redirectPort=8443 acceptCount=75 debug=0 connectionTimeout=2 proxyPort=80 proxyName=www.our_service_name.com disableUploadTimeout=false / Context path= docBase=/doc/path debug=0 reloadable=false liveDeploy=false swallowOutput=false / web.xml looks like this: servlet servlet-namejsp/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namefork/param-name param-valuefalse/param-value /init-param init-param param-namexpoweredBy/param-name param-valuefalse/param-value /init-param init-param param-nameenablePooling/param-name param-valuefalse/param-value /init-param load-on-startup3/load-on-startup /servlet I am running out of configuration ideas so I hope somebody could provide information about the load problem Yours, - Jouko --- Jouko Johansson software engineer Infosto Oy / SanomaWSOY konserni Pyhäranta 7, 33211 Tampere, Finland Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- --- Jouko Johansson software engineer Infosto Oy / SanomaWSOY konserni Pyhäranta 7, 33211 Tampere, Finland Email: [EMAIL PROTECTED] Puh : +358 3 2524 525 Mob :+358 40 578 57 58 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Promlems with TransformSupport-tag in 5.0.18
Hi, We are testing a tomcat 5.0.18 and everything works well but... javax.servlet.jsp.JspException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.IllegalStateException: can't declare any more prefixes in this context at org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(Unknown Source) at org.apache.taglibs.standard.tag.el.xml.TransformTag.doStartTag(Unknown Source) This xml transformation worked with the tomcat 4.1.x and tomcat 4.0.x without any problems. The tomcat 5.0.18 is configured as it is (from the package) only with the root-context re-definition. Perhaps somebody can help me, Yours, Jouko - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Promlems with TransformSupport-tag in 5.0.18
The problem solved by updating our xalan.jar and xerces.jar to the latest version. -Jouko Jouko Johansson wrote: Hi, We are testing a tomcat 5.0.18 and everything works well but... javax.servlet.jsp.JspException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.IllegalStateException: can't declare any more prefixes in this context at org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(Unknown Source) at org.apache.taglibs.standard.tag.el.xml.TransformTag.doStartTag(Unknown Source) This xml transformation worked with the tomcat 4.1.x and tomcat 4.0.x without any problems. The tomcat 5.0.18 is configured as it is (from the package) only with the root-context re-definition. Perhaps somebody can help me, Yours, Jouko - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classloader problems
Hi, We are using Tomcat 4.1.29. There randomly occurs following kind of error in some page which is rarely used: java.lang.NullPointerException at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:179) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) After restarting of the tomcat, the system works fine, but it may explode again in different JSP-page. Usuallly it runs correctly about 5 hours. System Information Tomcat: tomcat 4.1.29 JDK: java version 1.4.2_03 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02) Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode) OS: Linux 2.4.20 #2 SMP Thank you for your help in advance. Yours, Jouko Johansson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NullPointerException in classloader?
Hi, System information Linux 2.4.20 #2 SMP jakarta-tomcat-4.0.6 java version 1.4.1_02 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06) Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode) We are running an simple webapp about 7 request / sec and sometimes occurs nullpointers in ClassLoader and few seconds later the Tomcat requires an restart. The time of the staying up is about 2 hours (approx.). clip catalina.out java.lang.NullPointerException at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:180) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at org.apache.jsp.www_0002dlogin$jsp._jspService(www_0002dlogin$jsp.java:270) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125) at java.lang.Thread.run(Thread.java:536) /clip catalina.out In the jsp code the code is following: code from jsp page where the exception occurs valueFromSession = (String)session.getAttribute(objectNameWhichIsTypeOfString); /code Value of the attribute in the user session may be an empty java.lang.String or java.lang.String with relocation information. I am afraid of that the problem might be else where but the stack trace does not give enough information to track down the problem. Also any suggestions to improve the jsp code is accepted also. If somebody could give us a clue where to find the problem and if somebody is having same kind of problems Yours, Jouko Johansson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]