Tuning of Tomcat 5.5
Hi Guys For the last couple of days I tried to find some information regarding tuning of Tomcat 5.5 Online or as a Book but couldn't find much. Where could I get any information about this ? I performed following steps to tune my tomcat. 1. Gave tomcat enough memory to run efficient 2. Increased the accpetCount,min/maxProcessors as well as the compression for the AJP Connector (see below) System Config. Apache + tomcat 5.5 and Jboss 3.2.7 server.xml Connector port=8009 minProcessors=50 maxProcessors=500 debug=0 enableLookups=false redirectPort=8443 acceptCount=1000 compression=on connectionTimeout=10 protocol=AJP/1.3 / Cheers Rolf Rolf Zelder Senior Software Architect Stratum Communications 16-22 Eastern Rd, South Melbourne, Vic, 3205 Notice -This message contains privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify Stratum Communications immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache Tomcat modjk - loss of communication - possibly tuning issue?
Under heavy loads the following errors appear in the mod_jk.log: [jk_ajp_common.c (681)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. [jk_ajp_common.c (1050)]: Error reading reply from tomcat. Tomcat is down or network problems. [jk_ajp_common.c (1187)]: ERROR: Receiving from tomcat failed, recoverable operation. err=0 [jk_ajp_common.c (681)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. [jk_ajp_common.c (1050)]: Error reading reply from tomcat. Tomcat is down or network problems. [jk_ajp_common.c (1187)]: ERROR: Receiving from tomcat failed, recoverable operation. err=1 [jk_ajp_common.c (681)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. [jk_ajp_common.c (1050)]: Error reading reply from tomcat. Tomcat is down or network problems. [jk_ajp_common.c (1187)]: ERROR: Receiving from tomcat failed, recoverable operation. err=2 [jk_ajp_common.c (1198)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 104 Some requests are handled just fine during the time when these problems are occuring, others result in the end users recieving the Internal Server Error from apache. The problem corrects itself, with the only tell-tale sign being the messages in the logfile. Based on comments in other threads and on other sites, we changed the configuration of our Connector to include connectionTimeout=-1 (disable connection timeouts - on very fast machines apache can apparently timeout before tomcat has a chance to respond), increase maxProcessors to 100 (from default of 75 - by running a ps and grep-ing for the number of tomcat processes, we can see that we are consistently running the maximum number of processes), and increase acceptCount to 100 (because our requests tend to take a fairly long time to be turned around by tomcat (lots of backend processing), we have a high number of concurrent requests). Configuration: Apache 2.0.44 connected to Tomcat 4.1.24 with mod_jk, loadbalancing between 2 tomcat instances Environment: Red Hat (2.4.18-24.7.xsmp) Dell PowerEdge 1650 4G RAM From server.xml Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=11009 minProcessors=5 maxProcessors=100 acceptCount=100 debug=0 connectionTimeout=-1 enableLookups=false/ I've configured each tomcat instance to use 1G of memory (-Xmx), although after running with gc logging on (-Xloggc), it appears that each instance is using only 65M - 120M. It appears to me that the problem is in the communication between apache and tomcat, and since we only see the problem during periods of heavy usage, I had been concentrating my efforts on tuning the parameters in the Connector. But my recent changes (maxProcessors from 75 to 100 and acceptCount from 10 to 100) don't seem to have alleviated the problem. Is it simply that they should be turned up further, or am I barking up the wrong tree? Any thoughts would be immensely appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Tomcat modjk - loss of communication - possibly tuning issue?
I think the best way is to increase the maxProcessors and acceptCount to be the same as the apache webserver. Check for the MaxClients entry in the httpd.conf. Sharon French [EMAIL PROTECTED] wrote:Under heavy loads the following errors appear in the mod_jk.log: [jk_ajp_common.c (681)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. [jk_ajp_common.c (1050)]: Error reading reply from tomcat. Tomcat is down or network problems. [jk_ajp_common.c (1187)]: ERROR: Receiving from tomcat failed, recoverable operation. err=0 [jk_ajp_common.c (681)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. [jk_ajp_common.c (1050)]: Error reading reply from tomcat. Tomcat is down or network problems. [jk_ajp_common.c (1187)]: ERROR: Receiving from tomcat failed, recoverable operation. err=1 [jk_ajp_common.c (681)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. [jk_ajp_common.c (1050)]: Error reading reply from tomcat. Tomcat is down or network problems. [jk_ajp_common.c (1187)]: ERROR: Receiving from tomcat failed, recoverable operation. err=2 [jk_ajp_common.c (1198)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 104 Some requests are handled just fine during the time when these problems are occuring, others result in the end users recieving the Internal Server Error from apache. The problem corrects itself, with the only tell-tale sign being the messages in the logfile. Based on comments in other threads and on other sites, we changed the configuration of our Connector to include connectionTimeout=-1 (disable connection timeouts - on very fast machines apache can apparently timeout before tomcat has a chance to respond), increase maxProcessors to 100 (from default of 75 - by running a ps and grep-ing for the number of tomcat processes, we can see that we are consistently running the maximum number of processes), and increase acceptCount to 100 (because our requests tend to take a fairly long time to be turned around by tomcat (lots of backend processing), we have a high number of concurrent requests). Configuration: Apache 2.0.44 connected to Tomcat 4.1.24 with mod_jk, loadbalancing between 2 tomcat instances Environment: Red Hat (2.4.18-24.7.xsmp) Dell PowerEdge 1650 4G RAM From server.xml port=11009 minProcessors=5 maxProcessors=100 acceptCount=100 debug=0 connectionTimeout=-1 enableLookups=false/ I've configured each tomcat instance to use 1G of memory (-Xmx), although after running with gc logging on (-Xloggc), it appears that each instance is using only 65M - 120M. It appears to me that the problem is in the communication between apache and tomcat, and since we only see the problem during periods of heavy usage, I had been concentrating my efforts on tuning the parameters in the Connector. But my recent changes (maxProcessors from 75 to 100 and acceptCount from 10 to 100) don't seem to have alleviated the problem. Is it simply that they should be turned up further, or am I barking up the wrong tree? Any thoughts would be immensely appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
fine tuning
Hi We migrated to tomcat 5.0.28 from jserv, which is affecting the performance after migration (for the same load as Jserv) Is there any recommended configuration changes/performance tuning documentation ? Any help is really appreciated Thanks, -Krishna
Performance Tuning [Apache2 + JK2 + Tomcat]
Hi, does anybody know which parameters are involved in tuning the performance of the configuration in subject? And witch tools use to monitor where are bottlenecks? How can I monitor how many request are queued on apache and how many on tomcat? Thanks, Matteo. Everything should be made as simple as possible, but not simpler. -- Albert Einstein _ Matteo TURRA mail: [EMAIL PROTECTED] Analisi sviluppo WEB tel: +39 051 61.11.430 KION Srl web: www.kion.it Via Cristoni, 86 tel: +39 051 61.11.411 40033 Casalecchio di Reno (BO) fax: +39 051 57.04.23 ITALIA _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache tuning question
Hello, I thought there was an apache mailing list, but the mailing list page points to this one(as well as php and some others.) So hopefully I will not get flamed for this question. I have a rh9 box with apache 2 and tomcat 5 The apache server gets about 1.2M hits a day on average i have about 110 httpd running when i do a ps -ef | grep httpd | wc -l, but on Monday mornings my busiest I have around 225 httpd running I am trying to determine what are the best setting for my prefork MPM settings. I am getting conflicting suggestions on MaxClients on the RH pages it says:: However, it is not recommended that the value for MaxClients exceeds 256 when using the prefork MPM. BUT on other pages is says that on busy sites i should have MaxClients 512 and ServerLimit set to 1024 Not sure if my server is considered busy. I am tending to think yes. these are my current settings: IfModule prefork.c StartServers 5 MinSpareServers 5 MaxSpareServers 10 ServerLimit 400 MaxClients400 MaxRequestsPerChild 0 /IfModule Thanks for any suggestions - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache tuning question
Hi, There IS an Apache mailing list: httpd-user, as described on http://httpd.apache.org/userslist.html. Since your question has more to do with the httpd component and not as much with Tomcat or the connectors, I'd ask there first if I were you ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Randy Paries [mailto:[EMAIL PROTECTED] Sent: Monday, October 04, 2004 9:38 AM To: 'Tomcat Users List' Subject: Apache tuning question Hello, I thought there was an apache mailing list, but the mailing list page points to this one(as well as php and some others.) So hopefully I will not get flamed for this question. I have a rh9 box with apache 2 and tomcat 5 The apache server gets about 1.2M hits a day on average i have about 110 httpd running when i do a ps -ef | grep httpd | wc -l, but on Monday mornings my busiest I have around 225 httpd running I am trying to determine what are the best setting for my prefork MPM settings. I am getting conflicting suggestions on MaxClients on the RH pages it says:: However, it is not recommended that the value for MaxClients exceeds 256 when using the prefork MPM. BUT on other pages is says that on busy sites i should have MaxClients 512 and ServerLimit set to 1024 Not sure if my server is considered busy. I am tending to think yes. these are my current settings: IfModule prefork.c StartServers 5 MinSpareServers 5 MaxSpareServers 10 ServerLimit 400 MaxClients400 MaxRequestsPerChild 0 /IfModule Thanks for any suggestions - 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]
HotSpot vs. Jikes + performance tuning
I'm starting to run Tomcat 5.0.27 on a production server box. The question I have is as to which JVM to run it under. Last time I checked (a year ago) jikes was a lot faster, but then again things are in constant flux. Also, my production server (RedHat 9.0 on a Celeron 2.6GHz and 512MB of RAM) could not be set up with the latest version of Apache (don't ask - it's my hosting company) and so I'm serving static content under Tomcat as well. I expect there to be a lot of traffic on this site and maximizing resources is a MUST. ANY input would be appreciated. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HotSpot vs. Jikes + performance tuning
Hi, I also haven't compared Jikes and javac in a while, but my impression is that JDK 1.4.2 made things very close to equal and even made javac faster sometimes. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 2:33 PM To: Tomcat Users List Subject: HotSpot vs. Jikes + performance tuning I'm starting to run Tomcat 5.0.27 on a production server box. The question I have is as to which JVM to run it under. Last time I checked (a year ago) jikes was a lot faster, but then again things are in constant flux. Also, my production server (RedHat 9.0 on a Celeron 2.6GHz and 512MB of RAM) could not be set up with the latest version of Apache (don't ask - it's my hosting company) and so I'm serving static content under Tomcat as well. I expect there to be a lot of traffic on this site and maximizing resources is a MUST. ANY input would be appreciated. Michael - 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: HotSpot vs. Jikes + performance tuning
On Mon, Jul 26, 2004 at 11:33:25AM -0700, Michael Mehrle wrote: :I'm starting to run Tomcat 5.0.27 on a production server box. The :question I have is as to which JVM to run it under. :[snip] :content under Tomcat as well. I expect there to be a lot of traffic on :this site and maximizing resources is a MUST. : : ANY input would be appreciated. Well, since you asked: 0/ test, test, test: that is, test load and functionality under various JVMs. See which one performs best, per your requirements. 1/ Tune, tune, tune: there's much more to performance than just the JDK. You'll also have to take heap, GC, etc into consideration. 2/ install this same JVM + configuration in production. Ideally, you'd have similar hardware in both your test and production environments, such that any tuning you do could be applied to both. Given what I see on the list, I get the impression most of the people here (or at least, most of the posters ;) use Sun's JVM. -but YYMV, and thus, you'd do yourself a favor to test it for yourself. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Tuning and Troubleshooting
Google found me a fine looking paper on Tomcat tuning and troubleshooting: http://kinetic.more.net/web/javaserver/resources/wpapers/printer/performance.pdf I just started reading it for myself. Anyone familiar with its contents who would like to comment is most welcome. Thanks - % __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Performance Tuning Question For Tomcat 4.1.29 On Windows 2000
That nice performance tuning presentation by Glenn Nielsen has some nice tips that I was unaware of, but there's one that's confusing me. In web.xml, he talks about the servlet init-param fork. This tells Tomcat to compile JSPs in a separate process if set to true. It prevents memory leaks due to javac and reduces GC due to JSP compiles. Then he explicitly says, Do not set fork to true on MS Windows. This this correct for Tomcat 4.1.29 running on Windows 2000? He also recommends setting the two servlet init-param development and mappedfile to false. I've never done that before. (Good to know.) How many other well-known settings am I missing? Thanks - % __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000
Hi, Note that these fork and development settings are explicitly covered in the tomcat docs with regards to development versus production configurations. For tomcat 4.1, see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Duffy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 2:32 PM To: [EMAIL PROTECTED] Subject: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000 That nice performance tuning presentation by Glenn Nielsen has some nice tips that I was unaware of, but there's one that's confusing me. In web.xml, he talks about the servlet init-param fork. This tells Tomcat to compile JSPs in a separate process if set to true. It prevents memory leaks due to javac and reduces GC due to JSP compiles. Then he explicitly says, Do not set fork to true on MS Windows. This this correct for Tomcat 4.1.29 running on Windows 2000? He also recommends setting the two servlet init-param development and mappedfile to false. I've never done that before. (Good to know.) How many other well-known settings am I missing? Thanks - % __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - 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]
RE: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000
Hi Yoav, Yup, I'm a doofus. ;) I realized after I'd sent this note out that I should look on the Tomcat site for help. I'm making those changes to my web.xml now. Sorry to waste your time, and thanks. - % --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Note that these fork and development settings are explicitly covered in the tomcat docs with regards to development versus production configurations. For tomcat 4.1, see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Duffy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 2:32 PM To: [EMAIL PROTECTED] Subject: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000 That nice performance tuning presentation by Glenn Nielsen has some nice tips that I was unaware of, but there's one that's confusing me. In web.xml, he talks about the servlet init-param fork. This tells Tomcat to compile JSPs in a separate process if set to true. It prevents memory leaks due to javac and reduces GC due to JSP compiles. Then he explicitly says, Do not set fork to true on MS Windows. This this correct for Tomcat 4.1.29 running on Windows 2000? He also recommends setting the two servlet init-param development and mappedfile to false. I've never done that before. (Good to know.) How many other well-known settings am I missing? Thanks - % __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - 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] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000
Hi, No problem, it's not a waste of time, if you missed it 1000 others did as well. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Duffy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 2:48 PM To: Tomcat Users List Subject: RE: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000 Hi Yoav, Yup, I'm a doofus. ;) I realized after I'd sent this note out that I should look on the Tomcat site for help. I'm making those changes to my web.xml now. Sorry to waste your time, and thanks. - % --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Note that these fork and development settings are explicitly covered in the tomcat docs with regards to development versus production configurations. For tomcat 4.1, see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Duffy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 2:32 PM To: [EMAIL PROTECTED] Subject: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000 That nice performance tuning presentation by Glenn Nielsen has some nice tips that I was unaware of, but there's one that's confusing me. In web.xml, he talks about the servlet init-param fork. This tells Tomcat to compile JSPs in a separate process if set to true. It prevents memory leaks due to javac and reduces GC due to JSP compiles. Then he explicitly says, Do not set fork to true on MS Windows. This this correct for Tomcat 4.1.29 running on Windows 2000? He also recommends setting the two servlet init-param development and mappedfile to false. I've never done that before. (Good to know.) How many other well-known settings am I missing? Thanks - % __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - 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] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - 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]
Re: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000
Hi all, I am new in community. I'd like to say that it is really good idea to have a book before fight with daily troubles. It has two advantages; 1. You can help by doing this to all developers and volunteers, 2. You have refined ideas to organize logic and understand what exactly happens inside of system btw; My recommendation is Tomcat The Definitive Guide by Jason Brittain Ian F. Darwin, O'Reilly Press Take care all... - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 9:49 PM Subject: RE: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000 Hi, No problem, it's not a waste of time, if you missed it 1000 others did as well. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Duffy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 2:48 PM To: Tomcat Users List Subject: RE: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000 Hi Yoav, Yup, I'm a doofus. ;) I realized after I'd sent this note out that I should look on the Tomcat site for help. I'm making those changes to my web.xml now. Sorry to waste your time, and thanks. - % --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Note that these fork and development settings are explicitly covered in the tomcat docs with regards to development versus production configurations. For tomcat 4.1, see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Duffy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 2:32 PM To: [EMAIL PROTECTED] Subject: Performance Tuning Question For Tomcat 4.1.29 On Windows 2000 That nice performance tuning presentation by Glenn Nielsen has some nice tips that I was unaware of, but there's one that's confusing me. In web.xml, he talks about the servlet init-param fork. This tells Tomcat to compile JSPs in a separate process if set to true. It prevents memory leaks due to javac and reduces GC due to JSP compiles. Then he explicitly says, Do not set fork to true on MS Windows. This this correct for Tomcat 4.1.29 running on Windows 2000? He also recommends setting the two servlet init-param development and mappedfile to false. I've never done that before. (Good to know.) How many other well-known settings am I missing? Thanks - % __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - 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] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - 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] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat configuration tuning
Hi guys, I am at stage where I have all my various components talking to one another (Apache http server 2.0.49 - Mod JK2 - Tomcat 4.1.30) and running nicely with each other, but the loads on the server are increasing rapidly in our production environment ( ~2000 logins/day and peak concurrency of ~75 currently ) and I want to get the best possible configuration for my server. (Dual 1GHz, 1GB Ram, Win 2k, SQL Server + Web/Apps servers). Now, ultimately this is up to me, but I am unsure of a few relationships and variables used in the configuration files. The settings I have work, but I want them to be optimal and more importantly I want to understand them, so any help on the following would be greatly appreciated. 1) server.xml/Connector/bufferSize. Is this allocated for every users session until it is terminated, or is it a peak size that could be allocated? 2) workers2.properties/shm.slots. Does this equate to the server.xml/Connector/maxProcessors? or are these fundamentally different? I have attached my fully working configuration below for those who are interested, as I noticed a lot of people in the archives looking for working examples using JK2. Many thanks, Matt P.S. I am new to the list but I have been using Tomcat for many years and love it, and if I can help with anyones queries, from the trivial to complex, I would be only too happy to do so. workers2.properties [logger] ## LOGGER ## # Log level. Supported: EMERG, ERROR, INFO, DEBUG level=ERROR # Log file. XXX you may be able to change this at runtime, to # implement rolling. file=${serverRoot}/logs/jk2_error.log [config] ## CONFIG ## # Location of the workers2.properties file file=${serverRoot}/conf/workers2.properties # Set the debug level of the config component debug=0 # Set the debug level of the hidden env component debugEnv=0 [shm] ## SHARED MEMORY SETUP ## # Name of the file that will be mmapped to use as shared memory, # If set to 'anonymous' use the anonymous shered memory file=${serverRoot}/logs/shm.file # Number of shared memory slots. Set to the number of child # processes slots=378 # Use process memory instead of shared memory. Useful for single # child mpm's useMemory=0 [lb:lb_group] ## LOAD BALANCER (EVEN IF USED ON ONE MACHINE) ## # If set, jk2 won't touch the headers in case of error and will # let for example Apache present the # ErrorDocument via mod_alias. noErrorHeader=1 # noWorkerMsg=No workers available # noWorkerCode=503 # hwBalanceErr= # If all the workers are in the error state, probably by Tomcat # refusing any new connections due to the overload, you can set # the timeout forcing lb to wait that some worker becomes # available, instead of immediately returning error to the # client. This is very useful in situations with high peek # load. The timeout should be set to the maximum application # call time, but not less then 1 second. timeout=5000 # Number of attempts that lb will try on each worker before # giving up. attempts=6 # Time to wait before retrying to see if the worker came out of # the error state. Default = 60secs recovery=30 # Sessions stick to the same worker, 1=true 0=false stickySession=1 [channel.socket:localhost:8009] ## CHANNEL SETUP, LINKED TO LOAD BALANCER ## # Port where Tomcat is listening. It is automatically extracted # from the name - you shouldn't have to specify it explicitely. port=8009 # Remote host. You should use the name, no need to override it host=127.0.0.1 # If 1, only requests for existing sessions will be forwarded graceful=0 # ? keepAlive=0 # Socket timeout for sending and receiving (0=infinite) timeout=0 # Load balancing factor to use. At this moment, it'll be set on # the worker, but in future it should be possible to use lb on # a channel level. lb_factor=100 # loadbalanced groups to which this channel and the associated # worker will be added, multivalued. You need to set it only if # you have an advanced setup with multiple clusters. group=lb_group # Must match the JVM route on tomcat Engine, for load balancing tomcatId=hsInstance [ajp13:localhost:8009] ## AJP1.3
RE: Tomcat configuration tuning
Hi Matt, Welcome to the list from me. It's funny because you have just listed precisely the same server setup as we are launching our new tomcat based app to this weekend and I have been having nightmares about performance. We have a system like this; user - IIS - JK2 ISAPI - Tomcat 5.0.19 - -- Content Management System Bean -- SQL Server 2000 -- SQL Server 2000 via JNDI resource setup Our application is built on Struts. We found performance to be very poor under a load of 20 users of 3 iterators of 20 page requests (13 secs per page) avg pages per secon 1.1!! Looking into it revealed too much XML, too much database connectivity and too much dynamic rending on the pages. I came up with a caching strategy for our navigation as well as removing all XML to database calls instead (you may have seen my last post) Along with other things I have managed 10 pages per seconds and 1.5 seconds per page under the same load test. I'm still not entirely happy and wonder if I am missing any confoguration type stuff to make my app run faster either in tomcat, jk2, iis and so fourth. I run tomcat as a service with -Xms128 -Xmx384. I would be very interested if you have time to hear of any useful quick tips you found can optimise via configuration - maybe even seeing your server.conf and anything else, perhaps any ideas about code optimisation and also how complex your system is (db accesses or other system integration). What are your page response times under load and so on. It's a big ask but you have a very similar hardware setup and I would like to maximise my use of it. Cheers! ADC -Original Message- From: Matt Woodings [mailto:[EMAIL PROTECTED] Sent: 08 April 2004 16:50 To: [EMAIL PROTECTED] Subject: Tomcat configuration tuning Hi guys, I am at stage where I have all my various components talking to one another (Apache http server 2.0.49 - Mod JK2 - Tomcat 4.1.30) and running nicely with each other, but the loads on the server are increasing rapidly in our production environment ( ~2000 logins/day and peak concurrency of ~75 currently ) and I want to get the best possible configuration for my server. (Dual 1GHz, 1GB Ram, Win 2k, SQL Server + Web/Apps servers). Now, ultimately this is up to me, but I am unsure of a few relationships and variables used in the configuration files. The settings I have work, but I want them to be optimal and more importantly I want to understand them, so any help on the following would be greatly appreciated. 1) server.xml/Connector/bufferSize. Is this allocated for every users session until it is terminated, or is it a peak size that could be allocated? 2) workers2.properties/shm.slots. Does this equate to the server.xml/Connector/maxProcessors? or are these fundamentally different? I have attached my fully working configuration below for those who are interested, as I noticed a lot of people in the archives looking for working examples using JK2. Many thanks, Matt P.S. I am new to the list but I have been using Tomcat for many years and love it, and if I can help with anyones queries, from the trivial to complex, I would be only too happy to do so. workers2.properties [logger] ## LOGGER ## # Log level. Supported: EMERG, ERROR, INFO, DEBUG level=ERROR # Log file. XXX you may be able to change this at runtime, to # implement rolling. file=${serverRoot}/logs/jk2_error.log [config] ## CONFIG ## # Location of the workers2.properties file file=${serverRoot}/conf/workers2.properties # Set the debug level of the config component debug=0 # Set the debug level of the hidden env component debugEnv=0 [shm] ## SHARED MEMORY SETUP ## # Name of the file that will be mmapped to use as shared memory, # If set to 'anonymous' use the anonymous shered memory file=${serverRoot}/logs/shm.file # Number of shared memory slots. Set to the number of child # processes slots=378 # Use process memory instead of shared memory. Useful for single # child mpm's useMemory=0 [lb:lb_group] ## LOAD BALANCER (EVEN IF USED ON ONE MACHINE) ## # If set, jk2 won't touch the headers in case of error and will # let for example Apache present the # ErrorDocument via mod_alias. noErrorHeader=1 # noWorkerMsg=No workers available # noWorkerCode=503 # hwBalanceErr= # If all
RE: Tomcat configuration tuning
Hi, Welcome to the list from me. It's funny because you have just listed precisely the same server setup as we are launching our new tomcat based You have a wacky definition of precisely because he has Apache at the front-end and you have IIS. Yoav Shapira 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]
RE: Tomcat configuration tuning
Yes ok :) but other than that ;) ADC. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 08 April 2004 17:01 To: Tomcat Users List Subject: RE: Tomcat configuration tuning Hi, Welcome to the list from me. It's funny because you have just listed precisely the same server setup as we are launching our new tomcat based You have a wacky definition of precisely because he has Apache at the front-end and you have IIS. Yoav Shapira 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat configuration tuning
Hey Yes our struts uses the tiles plugin also. And the page load times are as a result of running on the server itself unfortunately. I am using the JTDS driver which apparently is one of the fastest SQL Server 2000 implementations for db connectivity. One of the things about our system is that every click the user makes is a search to the CMS for content that belongs to that page. This could be considered sub-optimal. For instance, I could cache results per 15 minutes or something, but content changes often so I thought I would leave it dynamic. I spent some time running JProfiler against the app. The accumulated CPU and memory seemed to ultimately come down to these search calls to the CMS especially under load. Per request I have to instantiate the vendors' bean which is an interface to the CMS server socket and is responsible for giving back all the data from the calls. I then simply package up what I need in data transfer objects and ship them to the JSPs. The JSPs are highly configurable in terms of skinning and so on and have calls to the file system to check if images are present and so on. I think I could cache that too. In fact looking at timings in the logs shows the page start to end is sub 1 second, the rest (user click - page process start) I think is caught up at the search but even so that is generally about 0.8s. Pages are taking about 0.1 and my cached implementation of nav takes 0.06 or so to load. But overall the pages under load feel like they take about 2 seconds and also I get the feeling tomcat is recompiling something it really doesn't need to - that was why I was interested in the development flag in server.conf and whether I should turn that to false. A fair amount of CPU and memory was going to Log4J also. I removed a lot of our unnecessary debugging statements and this too helped. I guess it comes down to the CMS load but any tips from others on the list are so very welcome, Cheers, ADC -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: 08 April 2004 17:22 To: Allistair Crossley Subject: RE: Tomcat configuration tuning I have seen a couple postings regarding poor performance with Tomcat recently and thought I'd respond because we are using IIS5 with Tomcat 5 and SQL 2000 as well. We have a Struts site but our difference is that we are using Tiles for our presentation... haven't really looked into the performance differences between Tiles and non-Tiles display rates As for our database connectivity... we are using an internally developed connection pooling class (no JNDI), but have recently started migrating to Hibernate. It is interesting hearing how long it is taking for the pages to be displayed considering we are on a similar set-up and have not noticed this type of problem. We have not made any special optimization setting changes, we basically did an out of the box set-up Is this occurring when running the app locally or on the server? I would be curious to know what is the resource load on the box running the app, how is the connectivity (bandwidth) to the box, has any sort of optimization tools been run against the code to check for bottle-necks? Not sure that I can provide much value technically, but feel free to ask -Dave -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 11:00 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject:RE: Tomcat configuration tuning Hi Matt, Welcome to the list from me. It's funny because you have just listed precisely the same server setup as we are launching our new tomcat based app to this weekend and I have been having nightmares about performance. We have a system like this; user - IIS - JK2 ISAPI - Tomcat 5.0.19 - -- Content Management System Bean -- SQL Server 2000 -- SQL Server 2000 via JNDI resource setup Our application is built on Struts. We found performance to be very poor under a load of 20 users of 3 iterators of 20 page requests (13 secs per page) avg pages per secon 1.1!! Looking into it revealed too much XML, too much database connectivity and too much dynamic rending on the pages. I came up with a caching strategy for our navigation as well as removing all XML to database calls instead (you may have seen my last post) Along with other things I have managed 10 pages per seconds and 1.5 seconds per page under the same load test. I'm still not entirely happy and wonder if I am missing any confoguration type stuff to make my app run faster either in tomcat, jk2, iis and so fourth. I run tomcat as a service with -Xms128 -Xmx384. I would be very interested if you have time to hear of any useful quick tips you found can optimise via configuration - maybe even seeing your server.conf and anything else, perhaps any ideas about code optimisation and also how complex your system
R: Tomcat configuration tuning
Hello, I'm having the same problem with a big news portal I'm developing (goal.com, and a few of other sites - italian soccer team - that share the same content management), and even if it is developed with .NET, the concept is almost the same. I don't know how your environment is set up, but u can cache the results for 15 min or even forever, but u can force a cache reload whenever you update a content in the adminstration application. If the frontend is running in another context (or even another server) then the admin site (and u don't have access to the same instance of the CMS), you can call a webservice (or a simplier page) to do this. Simone - Simone Chiaretta www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard -Messaggio originale- Da: Allistair Crossley [mailto:[EMAIL PROTECTED] Inviato: giovedì 8 aprile 2004 18.33 A: LILES, DAVID (CONTRACTOR); [EMAIL PROTECTED] Oggetto: RE: Tomcat configuration tuning Hey Yes our struts uses the tiles plugin also. And the page load times are as a result of running on the server itself unfortunately. I am using the JTDS driver which apparently is one of the fastest SQL Server 2000 implementations for db connectivity. One of the things about our system is that every click the user makes is a search to the CMS for content that belongs to that page. This could be considered sub-optimal. For instance, I could cache results per 15 minutes or something, but content changes often so I thought I would leave it dynamic. I spent some time running JProfiler against the app. The accumulated CPU and memory seemed to ultimately come down to these search calls to the CMS especially under load. Per request I have to instantiate the vendors' bean which is an interface to the CMS server socket and is responsible for giving back all the data from the calls. I then simply package up what I need in data transfer objects and ship them to the JSPs. The JSPs are highly configurable in terms of skinning and so on and have calls to the file system to check if images are present and so on. I think I could cache that too. In fact looking at timings in the logs shows the page start to end is sub 1 second, the rest (user click - page process start) I think is caught up at the search but even so that is generally about 0.8s. Pages are taking about 0.1 and my cached implementation of nav takes 0.06 or so to load. But overall the pages under load feel like they take about 2 seconds and also I get the feeling tomcat is recompiling something it really doesn't need to - that was why I was interested in the development flag in server.conf and whether I should turn that to false. A fair amount of CPU and memory was going to Log4J also. I removed a lot of our unnecessary debugging statements and this too helped. I guess it comes down to the CMS load but any tips from others on the list are so very welcome, Cheers, ADC -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: 08 April 2004 17:22 To: Allistair Crossley Subject: RE: Tomcat configuration tuning I have seen a couple postings regarding poor performance with Tomcat recently and thought I'd respond because we are using IIS5 with Tomcat 5 and SQL 2000 as well. We have a Struts site but our difference is that we are using Tiles for our presentation... haven't really looked into the performance differences between Tiles and non-Tiles display rates As for our database connectivity... we are using an internally developed connection pooling class (no JNDI), but have recently started migrating to Hibernate. It is interesting hearing how long it is taking for the pages to be displayed considering we are on a similar set-up and have not noticed this type of problem. We have not made any special optimization setting changes, we basically did an out of the box set-up Is this occurring when running the app locally or on the server? I would be curious to know what is the resource load on the box running the app, how is the connectivity (bandwidth) to the box, has any sort of optimization tools been run against the code to check for bottle-necks? Not sure that I can provide much value technically, but feel free to ask -Dave -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 11:00 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: RE: Tomcat configuration tuning Hi Matt, Welcome to the list from me. It's funny because you have just listed precisely the same server setup as we are launching our new tomcat based app to this weekend and I have been having nightmares about performance. We have a system like this; user - IIS - JK2 ISAPI
Re: Tomcat configuration tuning
Hi Allistair, Thanks for the quick response. My server.xml file is below but to some of the questions you had. One of the biggest speed increases we gained was from SQL optimization and table tuning. One thing about server.xml configuration which I realised is the acceptCount being set too high, because if your server is struggling anyway having the requests backing up is not going to help in fact may help it to go down. What I mean by SQL optimization is we had java take over a lot of processing rather than the database, so some of our queries may seem at first a little broad but the speed increase was incredible. Think how fast java can iterate through a set of results rather than constantly referring to the db, so that was one. Also, one of our tables is heavily used and also ever increasing in size, so to keep this fast I keep only a few weeks worth of data in it (so its indexing is still really quick) and offload the rest to a history table which is only used for reporting ... so based on date range I either quickly recieve the latest info or slightly slower receive data from the past. Unfortunately I am unable to give you response times as they would be meaningless (number of db hits, processing etc), but suffice to say its in the region of 100msecs for non db jsp pages to 20+ secs (depending upon connection) for insanely large amounts of db/processed pages and for the vast majority of pages for select style queries are about 700msecs. Sorry I can't be of more help there. I haven't read your post on caching yet, but I rely heavily on XML for our site, from configuration to the menu options, and I also use streamed XML to XSLT for all our views. I guess it comes down to what you need to do, but I would love to hear how you are using it. One of the problems I am tackling at the moment is for places where there is a lot of db inserts/updates which can't be done on-mass, so I am coming up with a plan to assign these tasks to be fulfilled at off peak times, or in manageable chunks so as to keep response times high. One of the problems I am overcoming is that our users aren't tech savvy and if a page doesn't load fast enough they will hit reload constantly and escalate any memory problems I may have had to the dreaded outOfMemory Exception. Regards, Matt P.S. Struts ROCKS!!! server.xml ?xml version='1.0' encoding='utf-8'? Server className=org.apache.catalina.core.StandardServer port=8005 debug=0 shutdown=SHUTDOWN Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0 jsr77Names=false/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ GlobalNamingResources Environment name=simpleValue override=true type=java.lang.Integer value=30/ Resource name=UserDatabase scope=Shareable type=org.apache.catalina.UserDatabase auth=Container description=User database that can be updated and saved/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service className=org.apache.catalina.core.StandardService debug=0 name=Tomcat-Load-Balance-1 Connector className=org.apache.coyote.tomcat4.CoyoteConnector redirectPort=8443 bufferSize=8192 port=8009 connectionTimeout=0 enableLookups=true protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler debug=0 disableUploadTimeout=true maxProcessors=378 minProcessors=5 acceptCount=100 useURIValidationHack=false / Engine jvmRoute=hsInstance debug=0 defaultHost=instance1 name=LoadBalance Host appBase=webapps autoDeploy=true debug=0 unpackWARs=true name=instance1 Context crossContext=true reloadable=true debug=0 docBase=** path=/hs Resource name=jdbc/** scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/** parameter nameurl/name value**/value /parameter parameter namemaxIdle/name value1000/value /parameter parameter namemaxActive/name value1/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value /parameter parameter namemaxWait/name value6/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name value**/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter parameter
RE: Tomcat configuration tuning
Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat configuration tuning
I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Tomcat configuration tuning
Hi, Did you profile the filter versus aspects? Now that's a benchmark I'd be really interested in. To the original poster: assuming your filter is smart enough to check the session for a user is authenticated already token, the /* mapping is not that big a deal. If you're re-authenticating every time, that's terrible, and you should make your filter smarter. Yoav Shapira Millennium Research Informatics -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:38 PM To: Tomcat Users List Subject: Re: Tomcat configuration tuning I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT -- -- - 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] 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]
Re: Tomcat configuration tuning
I've never actually used a profiler before. I keep meaning to I swear. Its my next big venture. I just figured out unit testing about 2 weeks ago. We just never have time for that silly testing and profiling stuff at my company. I never actually wrote the filter either. But I have one around that I could use to at least do some testing. I'll try this profiling and try to get the results back to the list. Charlie Shapira, Yoav wrote: Hi, Did you profile the filter versus aspects? Now that's a benchmark I'd be really interested in. To the original poster: assuming your filter is smart enough to check the session for a user is authenticated already token, the /* mapping is not that big a deal. If you're re-authenticating every time, that's terrible, and you should make your filter smarter. Yoav Shapira Millennium Research Informatics -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:38 PM To: Tomcat Users List Subject: Re: Tomcat configuration tuning I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT -- -- - 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] 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat configuration tuning
Hi Yoav It's the Samba team JCIFS NTLM servlet filter, so I guess I need to find out from them if the auth is done each time. Cheers, ADC -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thu 08/04/2004 20:39 To: Tomcat Users List Cc: Subject: RE: Tomcat configuration tuning Hi, Did you profile the filter versus aspects? Now that's a benchmark I'd be really interested in. To the original poster: assuming your filter is smart enough to check the session for a user is authenticated already token, the /* mapping is not that big a deal. If you're re-authenticating every time, that's terrible, and you should make your filter smarter. Yoav Shapira Millennium Research Informatics -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:38 PM To: Tomcat Users List Subject: Re: Tomcat configuration tuning I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT -- -- - 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] 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat configuration tuning
All our actions extend an abstract base action that handles auth if the session user is null and then delegates to a subclass to do the actial work which is another way of what you describe there. Hm...are you saying you use JCIFS also? Is the loginContext your own or part of the JCIFS API. ADC -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Thu 08/04/2004 20:38 To: Tomcat Users List Cc: Subject: Re: Tomcat configuration tuning I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat configuration tuning
LoginContext is part of the jdk1.4. javax.security.auth.login.LoginContext. It is usually extended by others. I found the very popular example on javaworld.com where the author created an RDBMDLoginContext. I changed that to my own OJBLoginContext because I use Apache OJB. Its pretty easy to write one, just override each of the methods. Charlie Allistair Crossley wrote: All our actions extend an abstract base action that handles auth if the session user is null and then delegates to a subclass to do the actial work which is another way of what you describe there. Hm...are you saying you use JCIFS also? Is the loginContext your own or part of the JCIFS API. ADC -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Thu 08/04/2004 20:38 To: Tomcat Users List Cc: Subject: Re: Tomcat configuration tuning I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Tomcat configuration tuning
Sorry, I was a little off in that last e-mail. The example on javaworld.com has you extending LoginContext to SessionLoginContext. It extends LoginContext and implements HttpSessionBindingListner. This is done so that when the session is over, the logout method is called from valueUnbound(). RDBMSLoginModule is the other class from the example and it implements LoginModule. This is the jaas class that you configure in your jaas.config file. None of this really has anything to do with Tomcat configuration tuning, sorry for going off on a tangent. Charlie Charles N. Harvey III wrote: LoginContext is part of the jdk1.4. javax.security.auth.login.LoginContext. It is usually extended by others. I found the very popular example on javaworld.com where the author created an RDBMDLoginContext. I changed that to my own OJBLoginContext because I use Apache OJB. Its pretty easy to write one, just override each of the methods. Charlie Allistair Crossley wrote: All our actions extend an abstract base action that handles auth if the session user is null and then delegates to a subclass to do the actial work which is another way of what you describe there. Hm...are you saying you use JCIFS also? Is the loginContext your own or part of the JCIFS API. ADC -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Thu 08/04/2004 20:38 To: Tomcat Users List Cc: Subject: Re: Tomcat configuration tuning I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tuning
Hello I am looking for docs/howto on tuning I am setting up some new boxes with rh9, tomcat 4 and apache 2 Any heads up from experience would help as well I am move the code from a rh7, tomcat 4 and apache 1.3 Thanks Randy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
Hi (yes that's me again), I have more details for those that would be willing to help. I have started to use IBM's JDK that has the nice memory dump feature set up so that whenever OutOfMemory occurs the heap is dumped. So my heap is here http://hry.atlas.cz/zaloha/heapdump.20040114.160700.8886.txt.gz Probably no need to download the 12MB - I have tried to process it and interesting result is this: I have used the k function of HeapRoots205 (here is its description): This executes by first running 'p 0x1234'. This leaves every object reachable by 0x1234 owned by it. Then any objects which are owned by 0x1234 but reachable from outside of this set are removed. This leaves 0x1234 owning exactly those objects which are only reachable thru' it. on following object: k 0x10102818 Calculating keep-alive size of 0x10102818 'org/apache/coyote/RequestGroupInfo' ... Requesting 17 mb of heapspace to process heapdump ... done. Finding pure Roots .. done. DFS from 0x10102818 . done. Total reach (inclusive) 1,245,481 objects. Total-size is 299,128,896. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
My previous post should be longer ... here is the rest: DFS from pure Roots ...done. DFS from objects unreached from Roots ...done. Found 1,051,382 objects which are reachable from elsewhere. These will be taken from 0x10102818 and then owned by other objects ... DFS from 0x10102818 . done. Keep-alive size (inclusive) is 194,099 objects. Total-size is 154,016,544. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
Still I don't see the whole thing - and trying to send the rest here: If I interpret it correctly the instance of org/apache/coyote/RequestGroupInfo holds 150 MB of heap memory. Also if I understand it correctly from here http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ someone just recently tried to do something with it. Am I totally paranoic when I suspect that the memory leak is in tomcat? Thanks for any hints (as usually) and best regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Tuning Memory leak
Howdy, If I interpret it correctly the instance of org/apache/coyote/RequestGroupInfo holds 150 MB of heap memory. Also if I understand it correctly from here http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat- connectors/coyote/src/java/org/apache/coyote/ someone just recently tried to do something with it. Am I totally paranoic when I suspect that the memory leak is in tomcat? You're not paranoid. There's a memory leak related to the RequestGroup/RequestGroupInfo connector code. It's been discussed during the past week on the dev mailing list, and addressed within the past couple of days. You can try the tomcat 5.0.18 build which has the fix. Yoav Shapira 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]
Re: Tomcat Tuning Memory leak
Shapira, Yoav wrote: You're not paranoid. There's a memory leak related to the RequestGroup/RequestGroupInfo connector code. It's been discussed during the past week on the dev mailing list, and addressed within the past couple of days. You can try the tomcat 5.0.18 build which has the fix. Yoav Shapira Thanks for the pointer. Although they talk only about 5.0.x I thing that the problem is present even in 4.1.29 - it might make sense to only downgrade to 4.1.27 because the classes in question were not there ... I will first try to set minProcessors==maxProcessors and see whether it helps even in 4.1.29. If it won't help I will think about moving to some other revision. Thanks again and best regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Tuning Memory leak
Hi All I am working on Tomcat 4.1.24 on Solatis-8, 12 CPU, 24GB RAM Machine. I am using Apache 2.0.43 and the Jdk version is 1.4.1_02. When I start my server then after 5-6 hours my server becomes very slow and then I need to restart my server. I am taking the top stats for the tomcat and have found that normally the thread remains between 100- 140 but when the system crashes it reaches to 372 and the memory gradually increases from 256 to some where around 660. The top stats are as follows PID USERNAME THR PRI NICE SIZE RES STATETIMECPU COMMAND 13082 root 115 00 653M 578M cpu/290 313:31 37.64% java 13082 root 139 70 654M 579M cpu/291 388:08 40.78% java 13082 root 143 00 654M 580M cpu/419 466:39 41.43% java 13082 root 374 10 662M 589M cpu/323 547:47 47.03% java 13082 root 374 100 662M 589M cpu/291 625:42 53.59% java Here the Thread count increases from 143 to 374 in just 10 min. Even though the no of user accessing this site has decreased. I really dont know what the problem is... I have set the Catalina Option as -Xms128M -Xmx512M but even setting the value of -XMx1024 doesn't solved my problem. The connector settings in my server.xml are as follows Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=5 bufferSize=2048 connectionTimeout=2 debug=0 disableUploadTimeout=false enableLookups=false maxProcessors=350 minProcessors=5 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false tcpNoDelay=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Please tell me what is the problem with my configuration. Please help me Thanks Regards Mohit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
Hi, I have the very same problem. I have tried everything possible with no outcome (the fork atribute for the jsp compiler did not help (with this I refer to a previous discussion here)). I suspect the CoyoteConnector being at fault but have no proof yet. I plan to run profiler but doing that with users hanging on our machine it requires a bit of courage. If you manage to solve this problem somehow please let me know (on this mailing list) because there is at least one person _very_ interested in solving this problem. Even if you succeed by trying another connector I would like to hear. Good luck and best regards, David Mohit Gupta wrote: Hi All I am working on Tomcat 4.1.24 on Solatis-8, 12 CPU, 24GB RAM Machine. I am using Apache 2.0.43 and the Jdk version is 1.4.1_02. When I start my server then after 5-6 hours my server becomes very slow and then I need to restart my server. I am taking the top stats for the tomcat and have found that normally the thread remains between 100- 140 but when the system crashes it reaches to 372 and the memory gradually increases from 256 to some where around 660. The top stats are as follows PID USERNAME THR PRI NICE SIZE RES STATETIMECPU COMMAND 13082 root 115 00 653M 578M cpu/290 313:31 37.64% java 13082 root 139 70 654M 579M cpu/291 388:08 40.78% java 13082 root 143 00 654M 580M cpu/419 466:39 41.43% java 13082 root 374 10 662M 589M cpu/323 547:47 47.03% java 13082 root 374 100 662M 589M cpu/291 625:42 53.59% java Here the Thread count increases from 143 to 374 in just 10 min. Even though the no of user accessing this site has decreased. I really dont know what the problem is... I have set the Catalina Option as -Xms128M -Xmx512M but even setting the value of -XMx1024 doesn't solved my problem. The connector settings in my server.xml are as follows Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=5 bufferSize=2048 connectionTimeout=2 debug=0 disableUploadTimeout=false enableLookups=false maxProcessors=350 minProcessors=5 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false tcpNoDelay=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Please tell me what is the problem with my configuration. Please help me Thanks Regards Mohit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
Ooops. I was too fast with my previous post. My config is different form yours: Connector className=org.apache.coyote.tomcat4.CoyoteConnector address=212.47.18.50 acceptCount=100 bufferSize=2048 compression=off connectionLinger=-1 connectionTimeout=2 connectionUploadTimeout=30 debug=0 disableUploadTimeout=true enableLookups=false maxKeepAliveRequests=100 maxProcessors=250 minProcessors=25 port=80 protocolHandlerClassName=org.apache.coyote.http11.Http11Protocol proxyPort=0 redirectPort=8443 scheme=http secure=false serverSocketTimeout=0 tcpNoDelay=true tomcatAuthentication=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Also my machine is a bit smaller ;-) (with linux). But the behaviour is very similar. Best, David David Strupl wrote: Hi, I have the very same problem. I have tried everything possible with no outcome (the fork atribute for the jsp compiler did not help (with this I refer to a previous discussion here)). I suspect the CoyoteConnector being at fault but have no proof yet. I plan to run profiler but doing that with users hanging on our machine it requires a bit of courage. If you manage to solve this problem somehow please let me know (on this mailing list) because there is at least one person _very_ interested in solving this problem. Even if you succeed by trying another connector I would like to hear. Good luck and best regards, David Mohit Gupta wrote: Hi All I am working on Tomcat 4.1.24 on Solatis-8, 12 CPU, 24GB RAM Machine. I am using Apache 2.0.43 and the Jdk version is 1.4.1_02. When I start my server then after 5-6 hours my server becomes very slow and then I need to restart my server. I am taking the top stats for the tomcat and have found that normally the thread remains between 100- 140 but when the system crashes it reaches to 372 and the memory gradually increases from 256 to some where around 660. The top stats are as follows PID USERNAME THR PRI NICE SIZE RES STATETIMECPU COMMAND 13082 root 115 00 653M 578M cpu/290 313:31 37.64% java 13082 root 139 70 654M 579M cpu/291 388:08 40.78% java 13082 root 143 00 654M 580M cpu/419 466:39 41.43% java 13082 root 374 10 662M 589M cpu/323 547:47 47.03% java 13082 root 374 100 662M 589M cpu/291 625:42 53.59% java Here the Thread count increases from 143 to 374 in just 10 min. Even though the no of user accessing this site has decreased. I really dont know what the problem is... I have set the Catalina Option as -Xms128M -Xmx512M but even setting the value of -XMx1024 doesn't solved my problem. The connector settings in my server.xml are as follows Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=5 bufferSize=2048 connectionTimeout=2 debug=0 disableUploadTimeout=false enableLookups=false maxProcessors=350 minProcessors=5 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false tcpNoDelay=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Please tell me what is the problem with my configuration. Please help me Thanks Regards Mohit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
Mohit Gupta wrote: I am working on Tomcat 4.1.24 on Solatis-8, 12 CPU, 24GB RAM Machine. I am using Apache 2.0.43 and the Jdk version is 1.4.1_02. When I start my server then after 5-6 hours my server becomes very slow and then I need to restart my server. I am taking the top stats for the tomcat and have found that normally the thread remains between 100- 140 but when the system crashes it reaches to 372 and the memory gradually increases from 256 to some where around 660. The top stats are as follows PID USERNAME THR PRI NICE SIZE RES STATETIMECPU COMMAND 13082 root 115 00 653M 578M cpu/290 313:31 37.64% java 13082 root 139 70 654M 579M cpu/291 388:08 40.78% java 13082 root 143 00 654M 580M cpu/419 466:39 41.43% java 13082 root 374 10 662M 589M cpu/323 547:47 47.03% java 13082 root 374 100 662M 589M cpu/291 625:42 53.59% java Here the Thread count increases from 143 to 374 in just 10 min. Even though the no of user accessing this site has decreased. I really dont know what the problem is... I have set the Catalina Option as -Xms128M -Xmx512M but even setting the value of -XMx1024 doesn't solved my problem. The connector settings in my server.xml are as follows Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=5 bufferSize=2048 connectionTimeout=2 debug=0 disableUploadTimeout=false enableLookups=false maxProcessors=350 minProcessors=5 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false tcpNoDelay=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Please tell me what is the problem with my configuration. Please help me First thing to find out is to figure out what all the threads are doing. Send the Tomcat process a -QUIT signal (`kill -QUIT 13082`) and capture the output which will be sent to stdout. You will get a stack trace for each thread showing what it is doing. You will probably find that the threads are busy somewhere in your application code. Additionally, upgrading to the latest Tomcat (4.1.27 or 5.0.16) and JDK (1.4.2_03) is a good idea as the latest versions have bug fixes and performance improvements. I doubt it is a Tomcat issue, it is more than likely an issue with your application, but the stack trace will show the cause. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
David Rees wrote: Additionally, upgrading to the latest Tomcat (4.1.27 or 5.0.16) and JDK (1.4.2_03) is a good idea as the latest versions have bug fixes and performance improvements. I doubt it is a Tomcat issue, it is more than likely an issue with your application, but the stack trace will show the cause. I have tomcat 4.1.29, JDK1.4.2. Also my app was completely ok with tomcat 3.x.x. The 100% of processor time occurs in my case only after the OOME. Before the OOME all the threads (both tomcat's and mine) are happy. Thanks for any hints, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
Hi! David Strupl wrote: I have tomcat 4.1.29, JDK1.4.2. Also my app was completely ok with tomcat 3.x.x. The 100% of processor time occurs in my case only after the OOME. Before the OOME all the threads (both tomcat's and mine) are happy. The processor usage is not too surprising. When your machine runs out of memory and there are still busy processes, most of the cpu time will go into swapping in and out those processes. Still, since most prople are perfectly happy with the tomcat build you are using, there seems to be a problem with your application code. Perhaps you could elaborate a bit further here? And, as we had that subject a few days ago, are you by chance re-using StringBuffer instances ;-) Regards, Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
Philipp Taprogge wrote: The processor usage is not too surprising. When your machine runs out of memory and there are still busy processes, most of the cpu time will go into swapping in and out those processes. Still, since most prople are perfectly happy with the tomcat build you are using, there seems to be a problem with your application code. Perhaps you could elaborate a bit further here? And, as we had that subject a few days ago, are you by chance re-using StringBuffer instances ;-) Yes - I was also not surprised with the CPU after the OOME. I will try to prepare a heap shapshot and post it here (only a link, don't worry) after I manage to get a usefull one. My application does not do anything special - it is an online gaming server with couple of JSPs and servlets. The profiling has not revealed any memory leak in my code so far. Also the code was running for several years in tomcat 3.x without any problem. After migrating to tomcat 4.x the nightmare began. Thanks for any hints, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
Hi again! David Strupl wrote: Also the code was running for several years in tomcat 3.x without any problem. After migrating to tomcat 4.x the nightmare began. Have you changed the JRE as well or are you running the tomcat 4 instance in the same VM as the tomcat 3 before? Just to make sure your problems are not arising from changes made to the JVM in the meantime. Regards, Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
Philipp Taprogge wrote: Have you changed the JRE as well or are you running the tomcat 4 instance in the same VM as the tomcat 3 before? Just to make sure your problems are not arising from changes made to the JVM in the meantime. I have upgraged the VM as well as the OS on the machine. In fact the whole machine is different now (being it dual-pentium this time). Right now I am further upgrading SUN JDK 1.4.2 to SUN 1.4.2_03 if that is going to have any impact. David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Tuning Memory leak
Howdy, Yes - I was also not surprised with the CPU after the OOME. I will try to prepare a heap shapshot and post it here (only a link, don't worry) after I manage to get a usefull one. Make sure it's one before the OutOfMemoryError ;) server with couple of JSPs and servlets. The profiling has not revealed any memory leak in my code so far. Also the code was running for several years in tomcat 3.x without any problem. After migrating to tomcat 4.x the nightmare began. There's no doubt tomcat 4 (and 5's) memory usage characteristics are significantly different from tomcat 3. Nearly everything in the code is significantly different. Is it possible your app doesn't have any leaks, but simply needs more memory under load than you're allocating it? (BTW, to refresh my memory, is this setup where the JSP pages change hourly?) Yoav Shapira 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]
Re: Tomcat Tuning Memory leak
Shapira, Yoav wrote: (BTW, to refresh my memory, is this setup where the JSP pages change hourly?) I have already changed this ;-) Also added the fork attribute to true for jsp compile. It is not caused by the app - after the app starts and first 100 or so users connect the memory jumps up to approx 130 MB. But during the next 24 hours it eats more than 300 megs. From what I have seen from the profiler so far number of my objects is fairly decent. But there are more and more approx 100k (98320 chars) buffers created somewhere. I will post more precise info later after I a. upgrade to the latest and greatest JDK 1.4.2_03 b. create some HTML output of the heap Thanks for any hints so far, best regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
David Strupl wrote: I have already changed this ;-) Also added the fork attribute to true for jsp compile. It is not caused by the app - after the app starts and first 100 or so users connect the memory jumps up to approx 130 MB. But during the next 24 hours it eats more than 300 megs. From what I have seen from the profiler so far number of my objects is fairly decent. But there are more and more approx 100k (98320 chars) buffers created somewhere. I will post more precise info later after I a. upgrade to the latest and greatest JDK 1.4.2_03 b. create some HTML output of the heap Your JSP page shouldn't have any business logic in it, that should be in beans that your JSP page uses. You can test the beans in a profiler and see if there is any memory leaks. If you are using JDK1.4.1 then that will probably be your problem as there was a memory leak in the String class that was fixed in JDK1.4.2. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IIS/Tomcat tuning
Hello, I would like to know your feeling about the IIS/Tomcat installation. We know that Apache/Tomcat works well but what can we say about IIS/Tomcat ? Is it reliable into production systems ? If you could inform me about this question or send me some links. Thanks for your job. Jean-René Blaive. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IIS/Tomcat tuning
Hello, Hi Jean rene, I would like to know your feeling about the IIS/Tomcat installation. We know that Apache/Tomcat works well but what can we say about IIS/Tomcat ? Is it reliable into production systems ? good question TROLL is IIS production ready /TROLL seems to be a troll but this is the main question... mod_jk is a very reliable connector AJP (3) is a good protocol... so your debts turn to have an answer for this TROLL:question don't have much experience with IIS... Tomcat (3.3 or 4.1.2x) are production ready releases... tuning can be made by several tricks: -config of tomcat - JVM - connectors for robustness constraints don't forget to use: load balancer facilities of the connectors clustering features of Tomcat 4.1 version (is it useful for you ?) If you could inform me about this question or send me some links. Thanks for your job. HTH Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat cluster tuning
Sorry can't give a recommendation. We had different results even for (nearly) the same software for different sites. For one site the IBM JDK worked best, for the other Sun's. Any given result may be wothless with the next version of either jdk. (Even with just changes in the minor revision) You have to test that - in your environment - with your application - with the expected behaviour of the users Even small changes in one of these setting can change the result which jdk is better for you. (At least that's our experience) -Original Message- From: Cristopher Daniluk [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 7:04 PM To: 'Tomcat Users List' Subject: RE: Tomcat cluster tuning Are there any recommendations for what JVM would work best? We're not doing anything fancy, so presumably any VM that works well with tomcat would work well for us. Are there any sites that talk about the different JVM tuning options that affect Tomcat? I haven't seen that many. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat cluster tuning
We are runing a cluster of 3 apache servers and 2 tomcat servers connected via AJP w/Oracle on backend. The cluster has been performing very well but we've had a recent load spike that's causing the tomcat servers to start swapping pretty hardcore despite JVM limitations. What is the -Xmx option limiting? Threads? Defined services? Instances of Tomcat? I would've thought that it would limit the entire tomcat instance, but we have been far exceeding the 768mb limit we set. We're connecting to Oracle on the back end via the JDBC thin client. When the site starts swapping, performance on Oracle queries goes exponentially downhill. A non-db page takes about 1 second to load before swapping, vs 5 seconds to load when its swapping. On the other hand, a db intensive page takes about 5 seconds to load normally, vs about 40-50 seconds when it begins to swap. That number begins to crawl quickly up until it exceeds the 5 minute max execution time and Tomcat cuts the request off. The servers are basically identically configured P1.8ghz machines with 1gb ram each. The connector line from server.xml is: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=100 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=-1 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / And we're running Apache 2.0.47 w/mod_jk1 and AJP1.3. the workers.properties is set to nonweighted balancing. Are there any options to tune tomcat to reduce memory footpritn and to let it queue more? We were initially running more maxProcessors but I turned it down hoping to alleviate the congestion. Tried turning it up thinking maybe the accept queue was the problem too, but that made it worse. Thanks, Cris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat cluster tuning
mx is limiting the heap of a java process. In other words: It limits the total heap for one tomcat instance. The total memory can be much higher: - stacksize per thread Some vm's let you set these values (-Xss). If you have some hundred of threads that can make up some memory. - static memory (like string constants, the code, ...) That pretty much defined at compile time. - and may be further sorts of memories that depend on the vendor and version of the jdk. Regarding your config: You can try to play with the combination of maxProcessors connectionTimeout acceptCount I'm not shure how the accepted but not processed request are handled (wether they are queued in one thread, or if each has it's own thread) There isn't much more you can change in tomcat. The best recommendation I have is to find out where the memory comes from and either to cure the cause or find out that you have to live with that memory usage and spend more memory. -Original Message- From: Cristopher Daniluk [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 5:33 PM To: [EMAIL PROTECTED] Subject: Tomcat cluster tuning What is the -Xmx option limiting? Threads? Defined services? Instances of Tomcat? I would've thought that it would limit the entire tomcat instance, but we have been far exceeding the 768mb limit we set. Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=100 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=-1 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat cluster tuning
Are there any recommendations for what JVM would work best? We're not doing anything fancy, so presumably any VM that works well with tomcat would work well for us. Are there any sites that talk about the different JVM tuning options that affect Tomcat? I haven't seen that many. -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 12:46 PM To: Tomcat Users List Subject: RE: Tomcat cluster tuning mx is limiting the heap of a java process. In other words: It limits the total heap for one tomcat instance. The total memory can be much higher: - stacksize per thread Some vm's let you set these values (-Xss). If you have some hundred of threads that can make up some memory. - static memory (like string constants, the code, ...) That pretty much defined at compile time. - and may be further sorts of memories that depend on the vendor and version of the jdk. Regarding your config: You can try to play with the combination of maxProcessors connectionTimeout acceptCount I'm not shure how the accepted but not processed request are handled (wether they are queued in one thread, or if each has it's own thread) There isn't much more you can change in tomcat. The best recommendation I have is to find out where the memory comes from and either to cure the cause or find out that you have to live with that memory usage and spend more memory. -Original Message- From: Cristopher Daniluk [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 5:33 PM To: [EMAIL PROTECTED] Subject: Tomcat cluster tuning What is the -Xmx option limiting? Threads? Defined services? Instances of Tomcat? I would've thought that it would limit the entire tomcat instance, but we have been far exceeding the 768mb limit we set. Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=100 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=-1 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / - 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: Tuning KeepAlive Connections?
That didn't work. Got the following in logs/catalina.out when I tried that: Aug 7, 2003 11:40:45 PM org.apache.coyote.http11.Http11Processor process WARNING: Error parsing HTTP request java.lang.IllegalArgumentException: timeout can't be negative at java.net.Socket.setSoTimeout(Socket.java:920) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:572) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:568) Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet Internet Advertising Delivery Solutions www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 -Original Message- From: Venkata Srinivasa Rao, Yerra [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:21 PM To: Tomcat Users List Subject: Re: Tuning KeepAlive Connections? To disable connection timeouts, set connectionTimeout value to -1 At 02:09 PM 8/7/2003 -0400, you wrote: RedHat Linux 7.3 IBM JDK 1.4.1 Tomcat 4.1.24 Is it possible to disable KeepAlive connections with the Coyote HTTP/1.1 connector? If it's not possible to turn them off, is it possible to lower the request limit and timeout period for them? Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tuning KeepAlive Connections?
You can (effectively) disable KeepAlive connections by setting the 'maxKeepAliveRequests=1' attribute on the Connector. Tomcat 5 has a more intuitive option, but it works the same way. If you have the maxKeepAliveRequests 1, then the 'connectionTimeout' attribute on the Connector determines how long it will wait for the next request. Mike Cherichetti (Renegade Internet) [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] RedHat Linux 7.3 IBM JDK 1.4.1 Tomcat 4.1.24 Is it possible to disable KeepAlive connections with the Coyote HTTP/1.1 connector? If it's not possible to turn them off, is it possible to lower the request limit and timeout period for them? Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tuning KeepAlive Connections?
Mike Cherichetti (Renegade Internet) [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Bill, Thanks for the info! Looks like that helped, but I can't tell for sure because the server isn't loaded too much right now. Will have to wait until morning to find out. Did I miss something or is that not in the docs? Might be good to add this to the docs :) I believe that it is in the TC 5 docs (without looking). And yes, it would be a good idea to add it to the TC 4 docs ;-). Thanks again, Mike -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker Sent: Friday, August 08, 2003 12:00 AM To: [EMAIL PROTECTED] Subject: Re: Tuning KeepAlive Connections? You can (effectively) disable KeepAlive connections by setting the 'maxKeepAliveRequests=1' attribute on the Connector. Tomcat 5 has a more intuitive option, but it works the same way. If you have the maxKeepAliveRequests 1, then the 'connectionTimeout' attribute on the Connector determines how long it will wait for the next request. Mike Cherichetti (Renegade Internet) [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] RedHat Linux 7.3 IBM JDK 1.4.1 Tomcat 4.1.24 Is it possible to disable KeepAlive connections with the Coyote HTTP/1.1 connector? If it's not possible to turn them off, is it possible to lower the request limit and timeout period for them? Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 - 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: Tuning KeepAlive Connections?
To disable connection timeouts, set connectionTimeout value to -1 At 02:09 PM 8/7/2003 -0400, you wrote: RedHat Linux 7.3 IBM JDK 1.4.1 Tomcat 4.1.24 Is it possible to disable KeepAlive connections with the Coyote HTTP/1.1 connector? If it's not possible to turn them off, is it possible to lower the request limit and timeout period for them? Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 - 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]
Tuning KeepAlive Connections?
RedHat Linux 7.3 IBM JDK 1.4.1 Tomcat 4.1.24 Is it possible to disable KeepAlive connections with the Coyote HTTP/1.1 connector? If it's not possible to turn them off, is it possible to lower the request limit and timeout period for them? Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tuning KeepAlive Connections?
Hi Bill, Thanks for the info! Looks like that helped, but I can't tell for sure because the server isn't loaded too much right now. Will have to wait until morning to find out. Did I miss something or is that not in the docs? Might be good to add this to the docs :) Thanks again, Mike -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker Sent: Friday, August 08, 2003 12:00 AM To: [EMAIL PROTECTED] Subject: Re: Tuning KeepAlive Connections? You can (effectively) disable KeepAlive connections by setting the 'maxKeepAliveRequests=1' attribute on the Connector. Tomcat 5 has a more intuitive option, but it works the same way. If you have the maxKeepAliveRequests 1, then the 'connectionTimeout' attribute on the Connector determines how long it will wait for the next request. Mike Cherichetti (Renegade Internet) [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] RedHat Linux 7.3 IBM JDK 1.4.1 Tomcat 4.1.24 Is it possible to disable KeepAlive connections with the Coyote HTTP/1.1 connector? If it's not possible to turn them off, is it possible to lower the request limit and timeout period for them? Have a nice day ... Sincerely, Mike Cherichetti Renegade Internet www.renegadeinternet.com Phone (724) 658-6346 Fax (724) 658-6346 - 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: JVM tuning
Howdy, Has anyone got any clues on JVM tuning for Tomcat on Windows 2000, Sun 141 I would venture at least a few people on this list have clues. But it's impossible to help you without a clue about your webapp. Yoav Shapira 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]
RE: JVM tuning
Hmm well only a profiler could tell me that; I was more looking for some (subsequently discovered) things such as you should reseize the young generation to be much larger than the default 25% and so on; there are some rules of thumb such as this which I was looking for! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:16 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Has anyone got any clues on JVM tuning for Tomcat on Windows 2000, Sun 141 I would venture at least a few people on this list have clues. But it's impossible to help you without a clue about your webapp. Yoav Shapira 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]
RE: JVM tuning
Howdy, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:27 AM To: Tomcat Users List Subject: RE: JVM tuning Hmm well only a profiler could tell me that; I was more looking for some (subsequently discovered) things such as you should reseize the young generation to be much larger than the default 25% and so on; there are some rules of thumb such as this which I was looking for! I would argue any such rule of thumb is as likely to hurt performance as improve it for your specific app. Yoav Shapira Millennium ChemInformatics 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]
RE: JVM tuning
Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) - read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:29 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:27 AM To: Tomcat Users List Subject: RE: JVM tuning Hmm well only a profiler could tell me that; I was more looking for some (subsequently discovered) things such as you should reseize the young generation to be much larger than the default 25% and so on; there are some rules of thumb such as this which I was looking for! I would argue any such rule of thumb is as likely to hurt performance as improve it for your specific app. Yoav Shapira Millennium ChemInformatics 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]
RE: JVM tuning
Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira 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]
RE: JVM tuning
Ah sorry I should really have said that I was focusing specifically on memory managment; general performance tuning is a completely different matter in which I do agree with you! On the memory front however I would stand by the fact that most tomcat webapps (big or small) would benefit from a change in the default JVM config. Anyway, have sorted out my problem now (by doing just that as well as a GC change) and performance is 10x better! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:45 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira 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]
RE: JVM tuning
Wouldn't AdaptiveSizePolicy help? (saves you the work of Java Heap usage analyzing :-) : I use this on my 2x proc machine. -XX:UseParallelGC -XX:+UseAdaptiveSizePolicy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:55 AM To: Tomcat Users List Subject: RE: JVM tuning Ah sorry I should really have said that I was focusing specifically on memory managment; general performance tuning is a completely different matter in which I do agree with you! On the memory front however I would stand by the fact that most tomcat webapps (big or small) would benefit from a change in the default JVM config. Anyway, have sorted out my problem now (by doing just that as well as a GC change) and performance is 10x better! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:45 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM tuning
Isnt the adaptive sizing only relevant to much larger memory configurations (Im running this JVM with a max heap of 1-1.5Gb? Pete Angus Mezick [EMAIL PROTECTED] 04/08/2003 17:51 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Wouldn't AdaptiveSizePolicy help? (saves you the work of Java Heap usage analyzing :-) : I use this on my 2x proc machine. -XX:UseParallelGC -XX:+UseAdaptiveSizePolicy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:55 AM To: Tomcat Users List Subject: RE: JVM tuning Ah sorry I should really have said that I was focusing specifically on memory managment; general performance tuning is a completely different matter in which I do agree with you! On the memory front however I would stand by the fact that most tomcat webapps (big or small) would benefit from a change in the default JVM config. Anyway, have sorted out my problem now (by doing just that as well as a GC change) and performance is 10x better! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:45 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM tuning
Ok, so if I set to 512M it isn't that effective? Would this be better in a 2xproc 512M heap environment: ConcurrentGC with ParNewGC (ParNewGC on Multi-CPU machines): -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 1:03 PM To: Tomcat Users List Subject: RE: JVM tuning Isnt the adaptive sizing only relevant to much larger memory configurations (Im running this JVM with a max heap of 1-1.5Gb? Pete Angus Mezick [EMAIL PROTECTED] 04/08/2003 17:51 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Wouldn't AdaptiveSizePolicy help? (saves you the work of Java Heap usage analyzing :-) : I use this on my 2x proc machine. -XX:UseParallelGC -XX:+UseAdaptiveSizePolicy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 9:55 AM To: Tomcat Users List Subject: RE: JVM tuning Ah sorry I should really have said that I was focusing specifically on memory managment; general performance tuning is a completely different matter in which I do agree with you! On the memory front however I would stand by the fact that most tomcat webapps (big or small) would benefit from a change in the default JVM config. Anyway, have sorted out my problem now (by doing just that as well as a GC change) and performance is 10x better! cheers Pete Shapira, Yoav [EMAIL PROTECTED] 04/08/2003 14:45 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: JVM tuning Howdy, Well not really; we know that we are running Tomcat, a web container which has its own (fixed) characteristics. It is a server side app which is processing non state based transactions which are thus highly like to involve a lot of objects being created and destroyed without too many hanging around for long; the details of the webapp, unless it is highly unusual, are likely not to matter particularly. This is a rule of thumb not an exact science and the vast majority of people who run Tomcat would benefit from running in such a configuration (or playing with it to see what the effects were) I disagree ;) Every time I've tuned a webapp for pay, both transactional and not, both full J2EE and just servlets/JSPs, the above has been false. The webapp's specific implementation matters far more (typically 3-4 orders of magnitude) than the container implementation, especially for a mature container which has been tuned repetitively and carefully over time. It's precisely because of this, and because as you say performance tuning is not a science, that a rule of thumb is as likely to hurt as it is to help if blindly applied. read Sun's own tuning documentation and you will see the default settings are not said to be suitable for the majority of server apps. I appreciate the pointer - I used to help write them ;) Good luck, however, as it's always YMMV with these things. Yoav Shapira 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] - 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]
JVM tuning
Has anyone got any clues on JVM tuning for Tomcat on Windows 2000, Sun 141 or 142? Im playing with some of the young/old generation and GC settings but am having trouble deciding what is best. I think that I should probably push out the young generation to be a larger than normal amount as many of the objects created are very transitory, and I have seen lots of GC activity going on there. On that note, has anyone tried the Sun GC portal? Im a bit baffled as to how to create a log file for it - turning on the switches is all very well and prints to the screen OK but it doesnt seem to log to the .out files? cheers Pete
Re: Production server tuning
Bill Barker wrote: Antonio Fiol Bonnín [EMAIL PROTECTED] wrote: However, I am worried about what you say about Apache 2.0.x and the 'worker' MPM. Could you please tell me about the real-world inconveniences of having 3/4 Apache 1.3.X with 2/3 tomcats behind? The mod_jk loadbalancer doesn't work well with pre-fork (including Apache 1.3.x on *nix systems). Since your not using the mod_jk loadbalancer, it shouldn't matter if you are using 1.3.x or 2.0.x. I'm curious, what are the issues with loadbalancing in mod_jk with a pre-forking Apache? -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Production server tuning
David Rees [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Barker wrote: Antonio Fiol Bonnín [EMAIL PROTECTED] wrote: However, I am worried about what you say about Apache 2.0.x and the 'worker' MPM. Could you please tell me about the real-world inconveniences of having 3/4 Apache 1.3.X with 2/3 tomcats behind? The mod_jk loadbalancer doesn't work well with pre-fork (including Apache 1.3.x on *nix systems). Since your not using the mod_jk loadbalancer, it shouldn't matter if you are using 1.3.x or 2.0.x. I'm curious, what are the issues with loadbalancing in mod_jk with a pre-forking Apache? Basically it comes down to the fact that the children don't talk to one another, so each one has its own idea of the relative loads. This usually results in a distribution (for the two-Tomcat case) somewhere between 70-30 and 80-20 (although people on this list have reported even more skewed distributions). It should get even more skewed as you increase the number of Tomcats. mod_jk2 already has the scoreboard (aka shm) in place to allow for the children to coordinate this, but at the moment isn't using it for loadbalancing (and so, is just as broken as mod_jk). I can't add much more except that patches are always welcome ;-) -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Production server tuning
Bill Barker wrote: I'm curious, what are the issues with loadbalancing in mod_jk with a pre-forking Apache? Basically it comes down to the fact that the children don't talk to one another, so each one has its own idea of the relative loads. This usually results in a distribution (for the two-Tomcat case) somewhere between 70-30 and 80-20 (although people on this list have reported even more skewed distributions). It should get even more skewed as you increase the number of Tomcats. mod_jk2 already has the scoreboard (aka shm) in place to allow for the children to coordinate this, but at the moment isn't using it for loadbalancing (and so, is just as broken as mod_jk). I can't add much more except that patches are always welcome ;-) Thanks, that explains the situation perfectly. Just to be clear, if you are using Apache 2 with threaded workers, threaded workers spawned from the same process do share the loadbalancing information correctly at this time? -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Production server tuning
Kwok Peng Tuck wrote: I'm no expert in load balancing and stuff like that, but shouldn't you load balance tomcat as well ? If I could do everything I wanted to... No. I am trying, but I cannot do that yet. Budget is not ready and purchase timings are far too long. Thanks anyway. Antonio Antonio Fiol Bonnín wrote: Hello, We have already gone live, and we actually spend too much time dead. I hope some of you can help me a bit about the problems we have. Architecture: 3 Apache web servers (1.3.23) behind a replicated load balancer in DMZ 1 Tomcat server (4.1.9) behind firewall, in secure zone. 1 Firewall in between. Some facts I observed: - Under high load, server sometimes hangs from the user's point of view (connection not refused, but nothing comes out of them. - Under low load, I netstat and I still see lots of ESTABLISHED connections between the web servers and the Tomcat server. For the first case, I reckon I might have found the cause: Apache MaxClients is set to 200, and Tomcat maxProcessors was set to something about 150. Taking into account that there are 3 Apache, that means 200 x 3 = 600 clients -- tomcat chokes. Just raised maxProcessors to 601 ;-) For the second one, I have really no clue: Apache MaxSpareServers is set to 10. I see more than 30 ESTABLISHED connections even with extremely load. Could someone point me to either - a solution (or part thereof, or hints, or ...) - a good tomcat tuning resource ? I hope I can find a solution for this soon... The Directors are starting to think that buying WebLogic is the solution to our nightmares. They think they only need to throw money at the problem. Please help me show them they are wrong before they spend the money. Thank you very much. Antonio Fiol - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: Production server tuning
john d. haro wrote: What is the load on your web servers? Very low. Could you repurpose a web server and load balance the app server instead? Web servers are light machines (uniprocessor, low memory, ...), while app server is a heavyweight (two nice fast processors, 4Gb RAM, ...). Web servers are Linux Intel, App server is Solaris/Sparc. Sadly I dont know anything about load balancing Tomcat and I'm usually doing BEA WL or WAS setups. I'm here to learn people... dont flame me. No flames. Thank you for your .02 [...] dont you performance test before going 'live'? We went live even before we were sure that everything was functionally correct. We have been very lucky it has. Now we're live-optimizing ;-( That is how we 'tune' our systems... run some serious load tests on your setup in a mirrored QA or staging environment prior to go-live. Then watch closely, use a code profiler or similar tools to see where the bottlenecks are. Play with the database and app server configurations... We will try to do that before our next update. Sometimes turning up things like connections will actually seriously degrade performance for a myriad of other reasons. Could you please elaborate a bit more on that? Apache JMeter running on several machines is a good load tester. Why did you say several machines? Do you mean JMeter may be the bottleneck if run single-instance? If you have the $$ and the project is important enough... we have had great results from the Compuware suite of products, TrueTime etc. I don't think so. Good luck Thank you. Antonio Fiol smime.p7s Description: S/MIME Cryptographic Signature
Re: Production server tuning
Bill Barker wrote: In theory, I'd go with Kwok's recommendation: one Apache with it's own load-balancer, and 3 Tomcats instead of 3 Apaches. However, in the real-world, this would require you to upgrade to Apache 2.0.x with the 'worker' MPM. We cannot repurpose machines. Three web servers (a fourth one is in the way, don't ask why) are a need for other projects, as Apache servers are shared. And technically, I don't think it is viable either (see previous post). However, I am worried about what you say about Apache 2.0.x and the 'worker' MPM. Could you please tell me about the real-world inconveniences of having 3/4 Apache 1.3.X with 2/3 tomcats behind? Yes, for your current config, you need to have your maxProcessors somewhere near 600 to handle peak load. For part two, go to each of your Apache machines and run: $ ps -ef | grep httpd | wc -l Done that. Very varying, depending on time of day. But we set MaxClients to 200 knowing what we were doing. We used to have 100 and it was not enough. Raised to 150 and still not enough. It was during a peak period, but I don't think we should lower it back. Add the numbers together, and subtract three (one for each of the Apache 'controller' processes). If the system has been running for awhile, this should be about the same as the number of connections to your Tomcat server on 8009, since mod_jk holds the connection open (by default) for the lifetime of the Apache child. The problem is that the connection is kept open even if unused, isn't it? I mean: If I do not connect to my web-app, does it start the connections? The threads that are waiting for Apache to talk to them are blocked pending input, so aren't affecting Tomcat's performance in any way. Except maybe memory requirement?? Since you are using 4.1.9, I'm assuming that you are using the AjpConnector (instead of the newer CoyoteConnector). I think it is CoyoteConnector, but I'd have to check to be sure. We'll be moving to 4.1.26 as soon as we have time to test our app on it. Stuck on 4.1.9 because of client cert auth problem. With the AjpConnector, you can set the attribute 'connectionTimeout=xx-ms' to have Tomcat drop the connection to Apache after xx milliseconds have gone by without traffic. Does that apply to CoyoteConnector? Is it really useful? For tuning, I like OptimizeIt (but it costs). It helped me once upon a time. But I'm in a different company now. I'm sure that other people will offer there opinions. Yes, I heard of JProbe. Never tested. Any insights? How is it compared to (3 years ago) OptimizeIt? Thank you very much for your answer, Bill. I think it was really useful. Antonio Fiol smime.p7s Description: S/MIME Cryptographic Signature
Re: Production server tuning
Antonio Fiol Bonnín [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Barker wrote: In theory, I'd go with Kwok's recommendation: one Apache with it's own load-balancer, and 3 Tomcats instead of 3 Apaches. However, in the real-world, this would require you to upgrade to Apache 2.0.x with the 'worker' MPM. We cannot repurpose machines. Three web servers (a fourth one is in the way, don't ask why) are a need for other projects, as Apache servers are shared. And technically, I don't think it is viable either (see previous post). However, I am worried about what you say about Apache 2.0.x and the 'worker' MPM. Could you please tell me about the real-world inconveniences of having 3/4 Apache 1.3.X with 2/3 tomcats behind? The mod_jk loadbalancer doesn't work well with pre-fork (including Apache 1.3.x on *nix systems). Since your not using the mod_jk loadbalancer, it shouldn't matter if you are using 1.3.x or 2.0.x. Yes, for your current config, you need to have your maxProcessors somewhere near 600 to handle peak load. For part two, go to each of your Apache machines and run: $ ps -ef | grep httpd | wc -l Done that. Very varying, depending on time of day. But we set MaxClients to 200 knowing what we were doing. We used to have 100 and it was not enough. Raised to 150 and still not enough. It was during a peak period, but I don't think we should lower it back. Add the numbers together, and subtract three (one for each of the Apache 'controller' processes). If the system has been running for awhile, this should be about the same as the number of connections to your Tomcat server on 8009, since mod_jk holds the connection open (by default) for the lifetime of the Apache child. The problem is that the connection is kept open even if unused, isn't it? I mean: If I do not connect to my web-app, does it start the connections? It will (by default) open the connection the first time that an Apache child gets a request for your web-app. After that the connection stays open for the lifetime of the Apache child. You can change the default by setting the connectionTimeout attribute on the Connector to a positive value (in milliseconds): e.g. connectionTime=6. This will cause the Tomcat thread to drop the connection to Apache if it doesn't recieve another request in the specified time (e.g. in the example 1 minute), and terminate. Generally, this hurts performance. However on one of my Linux 7.x boxes it improved the stability by reducing the average total thread count in Tomcat. The threads that are waiting for Apache to talk to them are blocked pending input, so aren't affecting Tomcat's performance in any way. Except maybe memory requirement?? Since you are using 4.1.9, I'm assuming that you are using the AjpConnector (instead of the newer CoyoteConnector). I think it is CoyoteConnector, but I'd have to check to be sure. We'll be moving to 4.1.26 as soon as we have time to test our app on it. Stuck on 4.1.9 because of client cert auth problem. With the AjpConnector, you can set the attribute 'connectionTimeout=xx-ms' to have Tomcat drop the connection to Apache after xx milliseconds have gone by without traffic. Does that apply to CoyoteConnector? Is it really useful? For tuning, I like OptimizeIt (but it costs). It helped me once upon a time. But I'm in a different company now. I'm sure that other people will offer there opinions. Yes, I heard of JProbe. Never tested. Any insights? How is it compared to (3 years ago) OptimizeIt? Thank you very much for your answer, Bill. I think it was really useful. Antonio Fiol smime.p7s Description: S/MIME cryptographic signature
Re: Production server tuning
In theory, I'd go with Kwok's recommendation: one Apache with it's own load-balancer, and 3 Tomcats instead of 3 Apaches. However, in the real-world, this would require you to upgrade to Apache 2.0.x with the 'worker' MPM. Yes, for your current config, you need to have your maxProcessors somewhere near 600 to handle peak load. For part two, go to each of your Apache machines and run: $ ps -ef | grep httpd | wc -l Add the numbers together, and subtract three (one for each of the Apache 'controller' processes). If the system has been running for awhile, this should be about the same as the number of connections to your Tomcat server on 8009, since mod_jk holds the connection open (by default) for the lifetime of the Apache child. The threads that are waiting for Apache to talk to them are blocked pending input, so aren't affecting Tomcat's performance in any way. Since you are using 4.1.9, I'm assuming that you are using the AjpConnector (instead of the newer CoyoteConnector). If you are using the WarpConnector, you are on your own ;-). With the AjpConnector, you can set the attribute 'connectionTimeout=xx-ms' to have Tomcat drop the connection to Apache after xx milliseconds have gone by without traffic. For tuning, I like OptimizeIt (but it costs). I'm sure that other people will offer there opinions. Antonio Fiol Bonnín [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, We have already gone live, and we actually spend too much time dead. I hope some of you can help me a bit about the problems we have. Architecture: 3 Apache web servers (1.3.23) behind a replicated load balancer in DMZ 1 Tomcat server (4.1.9) behind firewall, in secure zone. 1 Firewall in between. Some facts I observed: - Under high load, server sometimes hangs from the user's point of view (connection not refused, but nothing comes out of them. - Under low load, I netstat and I still see lots of ESTABLISHED connections between the web servers and the Tomcat server. For the first case, I reckon I might have found the cause: Apache MaxClients is set to 200, and Tomcat maxProcessors was set to something about 150. Taking into account that there are 3 Apache, that means 200 x 3 = 600 clients -- tomcat chokes. Just raised maxProcessors to 601 ;-) For the second one, I have really no clue: Apache MaxSpareServers is set to 10. I see more than 30 ESTABLISHED connections even with extremely load. Could someone point me to either - a solution (or part thereof, or hints, or ...) - a good tomcat tuning resource ? I hope I can find a solution for this soon... The Directors are starting to think that buying WebLogic is the solution to our nightmares. They think they only need to throw money at the problem. Please help me show them they are wrong before they spend the money. Thank you very much. Antonio Fiol - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Production server tuning
What is the load on your web servers? Could you repurpose a web server and load balance the app server instead? Most of the systems I set up replicate application servers and come to think of it I almost never get enough load on a single Apache HTTP server to need more than one box. (I'm speaking about load and NOT failover). Sadly I dont know anything about load balancing Tomcat and I'm usually doing BEA WL or WAS setups. I'm here to learn people... dont flame me. Here is another couple .02 for you - hindsight is 20/20 but dont you performance test before going 'live'? That is how we 'tune' our systems... run some serious load tests on your setup in a mirrored QA or staging environment prior to go-live. Then watch closely, use a code profiler or similar tools to see where the bottlenecks are. Play with the database and app server configurations... Sometimes turning up things like connections will actually seriously degrade performance for a myriad of other reasons. Apache JMeter running on several machines is a good load tester. If you have the $$ and the project is important enough... we have had great results from the Compuware suite of products, TrueTime etc. Good luck John Haro -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 12:47 AM To: Tomcat Users List Subject: Re: Production server tuning I'm no expert in load balancing and stuff like that, but shouldn't you load balance tomcat as well ? Antonio Fiol Bonnín wrote: Hello, We have already gone live, and we actually spend too much time dead. I hope some of you can help me a bit about the problems we have. Architecture: 3 Apache web servers (1.3.23) behind a replicated load balancer in DMZ 1 Tomcat server (4.1.9) behind firewall, in secure zone. 1 Firewall in between. Some facts I observed: - Under high load, server sometimes hangs from the user's point of view (connection not refused, but nothing comes out of them. - Under low load, I netstat and I still see lots of ESTABLISHED connections between the web servers and the Tomcat server. For the first case, I reckon I might have found the cause: Apache MaxClients is set to 200, and Tomcat maxProcessors was set to something about 150. Taking into account that there are 3 Apache, that means 200 x 3 = 600 clients -- tomcat chokes. Just raised maxProcessors to 601 ;-) For the second one, I have really no clue: Apache MaxSpareServers is set to 10. I see more than 30 ESTABLISHED connections even with extremely load. Could someone point me to either - a solution (or part thereof, or hints, or ...) - a good tomcat tuning resource ? I hope I can find a solution for this soon... The Directors are starting to think that buying WebLogic is the solution to our nightmares. They think they only need to throw money at the problem. Please help me show them they are wrong before they spend the money. Thank you very much. Antonio Fiol - 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: Production server tuning
From: Antonio Fiol Bonnín fiol.bonnin () terra ! es Subject: Production server tuning For the first case, I reckon I might have found the cause: Apache MaxClients is set to 200, and Tomcat maxProcessors was set to something about 150. Taking into account that there are 3 Apache, that means 200 x 3 = 600 clients -- tomcat chokes. Just raised maxProcessors to 601 ;-) In terms of setting MaxClients, look at the size of each web server process (via ps), and compare that with the amount of available memory on the machine. You can set MaxClients to a high a number as will fit in physical ram. You don't want to set MaxClients too high -- if your machine starts paging heavily, that will really slow things down. For the second one, I have really no clue: Apache MaxSpareServers is set to 10. I see more than 30 ESTABLISHED connections even with extremely load. This is a case where mod_status is really helpful. Add this to your apache configuration. ExtendedStatus On Location /server-status SetHandler server-status Order deny,allow Deny from all Allow from localhost /Location With that in place, lynx -dump http://localhost/server-status?auto # omit ?auto for more verbose details Look at the scoreboard section of the output. You should see a series of the letters K, W, R. K is server in keepalive state. W is a server in that is writing a response. R is a server that is reading a response. Start collecting the output, say, at 10 minute intervals. Once you've got a representative set of data, start looking through it: - Are there a lot of servers in KeepAlive state? If so, try decreasing KeepAliveTimeout. - Is the number of busy server processes near MaxClients? If so, consider raising MaxClients (if the machine has enough physical ram to handle it). Otherwise, consider adding another web server to your front end. - If the bottleneck is on the backend, adding another application server is a completely reasonable thing to do. Other things to look at: - monitor memory usage (vmstat, or some such). If your machines are paging, add ram. Do this on web and application servers. - montior load (aka uptime). If the loads are consistently high, your best bet is probably to throw more hardware at the problem :) - Are you logging response times? (Apaches %T, or something at the application level in your servlets/jsp pages). Is there a particular servlet, or jsp page that's taking excessively long? - Are you doing reverse dns lookups (HostnameLookups On). If so, turn them off. As far as apache tuning, http://httpd.apache.org/docs/misc/perf-tuning.html Is a good start. I don't have a good tomcat reference, though. hth. -- Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Production server tuning
This is good info. Thanks for posting!! John [EMAIL PROTECTED] wrote: From: Antonio Fiol Bonnín fiol.bonnin () terra ! es Subject: Production server tuning For the first case, I reckon I might have found the cause: Apache MaxClients is set to 200, and Tomcat maxProcessors was set to something about 150. Taking into account that there are 3 Apache, that means 200 x 3 = 600 clients -- tomcat chokes. Just raised maxProcessors to 601 ;-) In terms of setting MaxClients, look at the size of each web server process (via ps), and compare that with the amount of available memory on the machine. You can set MaxClients to a high a number as will fit in physical ram. You don't want to set MaxClients too high -- if your machine starts paging heavily, that will really slow things down. For the second one, I have really no clue: Apache MaxSpareServers is set to 10. I see more than 30 ESTABLISHED connections even with extremely load. This is a case where mod_status is really helpful. Add this to your apache configuration. ExtendedStatus On Location /server-status SetHandler server-status Order deny,allow Deny from all Allow from localhost /Location With that in place, lynx -dump http://localhost/server-status?auto # omit ?auto for more verbose details Look at the scoreboard section of the output. You should see a series of the letters K, W, R. K is server in keepalive state. W is a server in that is writing a response. R is a server that is reading a response. Start collecting the output, say, at 10 minute intervals. Once you've got a representative set of data, start looking through it: - Are there a lot of servers in KeepAlive state? If so, try decreasing KeepAliveTimeout. - Is the number of busy server processes near MaxClients? If so, consider raising MaxClients (if the machine has enough physical ram to handle it). Otherwise, consider adding another web server to your front end. - If the bottleneck is on the backend, adding another application server is a completely reasonable thing to do. Other things to look at: - monitor memory usage (vmstat, or some such). If your machines are paging, add ram. Do this on web and application servers. - montior load (aka uptime). If the loads are consistently high, your best bet is probably to throw more hardware at the problem :) - Are you logging response times? (Apaches %T, or something at the application level in your servlets/jsp pages). Is there a particular servlet, or jsp page that's taking excessively long? - Are you doing reverse dns lookups (HostnameLookups On). If so, turn them off. As far as apache tuning, http://httpd.apache.org/docs/misc/perf-tuning.html Is a good start. I don't have a good tomcat reference, though. hth. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Production server tuning
Hello, We have already gone live, and we actually spend too much time dead. I hope some of you can help me a bit about the problems we have. Architecture: 3 Apache web servers (1.3.23) behind a replicated load balancer in DMZ 1 Tomcat server (4.1.9) behind firewall, in secure zone. 1 Firewall in between. Some facts I observed: - Under high load, server sometimes hangs from the user's point of view (connection not refused, but nothing comes out of them. - Under low load, I netstat and I still see lots of ESTABLISHED connections between the web servers and the Tomcat server. For the first case, I reckon I might have found the cause: Apache MaxClients is set to 200, and Tomcat maxProcessors was set to something about 150. Taking into account that there are 3 Apache, that means 200 x 3 = 600 clients -- tomcat chokes. Just raised maxProcessors to 601 ;-) For the second one, I have really no clue: Apache MaxSpareServers is set to 10. I see more than 30 ESTABLISHED connections even with extremely load. Could someone point me to either - a solution (or part thereof, or hints, or ...) - a good tomcat tuning resource ? I hope I can find a solution for this soon... The Directors are starting to think that buying WebLogic is the solution to our nightmares. They think they only need to throw money at the problem. Please help me show them they are wrong before they spend the money. Thank you very much. Antonio Fiol smime.p7s Description: S/MIME Cryptographic Signature
Re: Production server tuning
I'm no expert in load balancing and stuff like that, but shouldn't you load balance tomcat as well ? Antonio Fiol Bonnín wrote: Hello, We have already gone live, and we actually spend too much time dead. I hope some of you can help me a bit about the problems we have. Architecture: 3 Apache web servers (1.3.23) behind a replicated load balancer in DMZ 1 Tomcat server (4.1.9) behind firewall, in secure zone. 1 Firewall in between. Some facts I observed: - Under high load, server sometimes hangs from the user's point of view (connection not refused, but nothing comes out of them. - Under low load, I netstat and I still see lots of ESTABLISHED connections between the web servers and the Tomcat server. For the first case, I reckon I might have found the cause: Apache MaxClients is set to 200, and Tomcat maxProcessors was set to something about 150. Taking into account that there are 3 Apache, that means 200 x 3 = 600 clients -- tomcat chokes. Just raised maxProcessors to 601 ;-) For the second one, I have really no clue: Apache MaxSpareServers is set to 10. I see more than 30 ESTABLISHED connections even with extremely load. Could someone point me to either - a solution (or part thereof, or hints, or ...) - a good tomcat tuning resource ? I hope I can find a solution for this soon... The Directors are starting to think that buying WebLogic is the solution to our nightmares. They think they only need to throw money at the problem. Please help me show them they are wrong before they spend the money. Thank you very much. Antonio Fiol - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 performance tuning
yes its milliseconds, my fault sorry At 00:08 18.07.2003 -0700, you wrote: Simon Pabst wrote: try reasonable values like 10 mins (600) Are you sure that is seconds...I think it's milliseconds. - Original Message - From: joseph lam [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 8:25 PM Subject: Re: JK2 performance tuning So nothing related to the jk2 connection between Apache and TC can be tuned? How many connections will Apache make? Auto grow? Joseph Lam Simon Pabst wrote: You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 performance tuning
As far as i know: (this may be wrong and can be different on your system/configuration - test) Theoretically Apache will do as many connections as childs are used, on Apache 2 the default maximum is 150 i think. I read somewhere that suggested for Tomcat is to use a higher Coyote maxProcessors value than max. Apache childs. However since the socket reinitialization seems bugged, without a timeout in CoyoteConnector their count goes up high (counted over 3000 open sockets on a load test with one Tomcat, count seems to go down only on Tomcat restart) There is also a max_connections setting for JK2 ajp13 worker, although this is propably only useful when you use load balancing: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configwebcom.html#workers At 11:25 18.07.2003 +0800, you wrote: So nothing related to the jk2 connection between Apache and TC can be tuned? How many connections will Apache make? Auto grow? Joseph Lam Simon Pabst wrote: You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - 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: JK2 performance tuning
hi there i was able to get in the administration tolls but please tell me what else have to configured as i am not able to see me pages from different machines in the network . only my machine with localhost:8080 displays the site please inform me how to do it .. Siddharth gupta IncrediMail - Email has finally evolved - Click Here
Re: JK2 performance tuning
I'm new to Apache 2Can you kindly show me how to config that? Joseph Luciano Kiniti Issoe wrote: Have you already compiled Apache for MaxClients 256 ? - Original Message - From: Simon Pabst [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 1:22 PM Subject: Re: JK2 performance tuning You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - 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]
JK2 performance tuning
I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 performance tuning
You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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: JK2 performance tuning
Have you already compiled Apache for MaxClients 256 ? - Original Message - From: Simon Pabst [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 1:22 PM Subject: Re: JK2 performance tuning You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 performance tuning
Sorry, but ¿timeout is in seconds or in milliseconds ? Thanks Mauricio Nuñez El Jue 17 Jul 2003 12:22, Simon Pabst escribió: You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 performance tuning
seconds as far as i know, not entirely sure though, anyone else knows? At 13:27 17.07.2003 -0400, you wrote: Sorry, but ¿timeout is in seconds or in milliseconds ? Thanks Mauricio Nuñez El Jue 17 Jul 2003 12:22, Simon Pabst escribió: You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - 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: JK2 performance tuning
Hi, Checking a bit, seconds to set the worker.properties property socket_timeout and millisecond setting the Connector connectionTimeuut at the server.xml Bye Mauricio El Jue 17 Jul 2003 13:43, Simon Pabst escribió: seconds as far as i know, not entirely sure though, anyone else knows? At 13:27 17.07.2003 -0400, you wrote: Sorry, but ¿timeout is in seconds or in milliseconds ? Thanks Mauricio Nuñez El Jue 17 Jul 2003 12:22, Simon Pabst escribió: You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 performance tuning
Checking the source code... ChannelSocket.java ,and his parents and friends :-) Bye! El Jue 17 Jul 2003 17:01, Simon Pabst escribió: Did you find any documentation about the CoyoteConnector server.xml timeout? In http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk2.html its missing :-( Or did you just use a stopwatch :-) At 13:58 17.07.2003 -0400, you wrote: Hi, Checking a bit, seconds to set the worker.properties property socket_timeout and millisecond setting the Connector connectionTimeuut at the server.xml Bye Mauricio El Jue 17 Jul 2003 13:43, Simon Pabst escribió: seconds as far as i know, not entirely sure though, anyone else knows? At 13:27 17.07.2003 -0400, you wrote: Sorry, but ¿timeout is in seconds or in milliseconds ? Thanks Mauricio Nuñez El Jue 17 Jul 2003 12:22, Simon Pabst escribió: You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or : too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam -- --- 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] - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 performance tuning
hm no, my brain keeps information only as long as he needs it, i.e. max. 1 hour ;-) thanks for the info though Norm. At 07:07 18.07.2003 +1000, you wrote: Simon It says milliseconds in the Tomcat docs (remember them?) for the connectors. Norm - Original Message - From: Simon Pabst [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, July 18, 2003 2:22 AM Subject: Re: JK2 performance tuning You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - 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: JK2 performance tuning
So nothing related to the jk2 connection between Apache and TC can be tuned? How many connections will Apache make? Auto grow? Joseph Lam Simon Pabst wrote: You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 performance tuning
Simon Pabst wrote: try reasonable values like 10 mins (600) Are you sure that is seconds...I think it's milliseconds. - Original Message - From: joseph lam [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 8:25 PM Subject: Re: JK2 performance tuning So nothing related to the jk2 connection between Apache and TC can be tuned? How many connections will Apache make? Auto grow? Joseph Lam Simon Pabst wrote: You can tune CoyoteConnector acceptCount and timeout values. acceptCount=10 should be fine, though you never know (test test test :-) timeout value (in seconds) shouldn't be set to 0 (infinite) or too high, else your socket count will go up much as time goes by (which not only consumes file descriptors but valuable JVM memory AFAIK), try reasonable values like 10 mins (600) (2 is suggested in jk2 doc). If timeout is too low you could get errors too (server not available), so test test test again. If you use mod_jk2 load balancing use multithreading Apache (worker mpm) At 20:25 17.07.2003 +0800, you wrote: I just got JK2 2.0.2 installed and working with Apache 2.0.47. Since my site will have high traffic and lots of concurrent connections, what parameters should I fine tune (other than the min/maxProcessor in server.xml) ? How does Apache manage its jk2 connections to Tomcat? Joseph Lam - 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] - 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: tomcat tuning
Hi, Please look at my tomcat confirmation below. I am having problems with database connection now. I am getting the following errors in catalina.out file: java.sql.SQLException: Error while trying to retrieve text for error ORA-12154 I am also unable to login to site. I get the above error. Any solutions? Thanks kapil -Original Message- From: Kapil Sharma [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 20:10 To: Tomcat Users List Subject: RE: tomcat tuning Thanks for reply. This answers one of the problem. Another problem is db connections. I am monitoring db connections and they are just increasing even if there is no load on the server. The problem is tomcat is not clearing idle connections or timing out the db connections. I still cannot understand how tomcat work directory fill up with 6GB of space in 24 hours. kapil -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 19:43 To: Tomcat Users List Subject: RE: tomcat tuning the error is that you have a limited number of file descriptor. so it doesn't look like your db pool is causing the problem, but your OS configuration. Increase the number of file descriptors for your system Filip -Original Message- From: Kapil Sharma [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 11:04 AM To: [EMAIL PROTECTED] Subject: tomcat tuning Hi Guys, I am facing a performance issue with tomcat 4.1.12 on Solaris. Following is my setup apache 1.3.27 tomcat 4.1.12 ajp 13 Following is my server.xml context for database and tomcat-apache connector ResourceParams name=jdbc/foo parameter nameurl/name valuejdbc:oracle:oci8:@foo/value /parameter parameter namevalidationQuery/name valueselect 1 from dual/value /parameter parameter namemaxIdle/name value0/value /parameter parameter namemaxActive/name value255/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxWait/name value3/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuetest/value /parameter parameter namepassword/name valuetest/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value300/value /parameter /ResourceParams Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=20 bufferSize=2048 connectionTimeout=2 debug=4 enableLookups=false maxProcessors=255 minProcessors=21 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false tcpNoDelay=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Following are the problems. I changed some parameters in the server.xml file to match the number of apache connections. I was also having heavy load on tomcat so I had to increase the database connections. Now the problem is tomcat is not closing the database connections and database pool is filling up. Tomcat filled up the system partition to 100% and threw the following errors for some reason: exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) at java.net.ServerSocket.implAccept(ServerSocket.java:439) at java.net.ServerSocket.accept(ServerSocket.java:410) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe rverSocketFactory.java:107) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java :335) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:483) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:533) at java.lang.Thread.run(Thread.java:536) Can anyone help me with this problem and refer me to some good docs for tomcat setup and performance issues for production heavy loaded servers? Thanks kapil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands
Re: tomcat tuning
Hi, I, personnaly, search archives using : http://marc.theaimsgroup.com/?l=tomcat-userr=1w=2 Hope this helps, Cédric - Original Message - From: Kapil Sharma [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 17, 2003 5:33 PM Subject: RE: tomcat tuning Hi, Please look at my tomcat confirmation below. I am having problems with database connection now. I am getting the following errors in catalina.out file: java.sql.SQLException: Error while trying to retrieve text for error ORA-12154 I am also unable to login to site. I get the above error. Any solutions? Thanks kapil -Original Message- From: Kapil Sharma [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 20:10 To: Tomcat Users List Subject: RE: tomcat tuning Thanks for reply. This answers one of the problem. Another problem is db connections. I am monitoring db connections and they are just increasing even if there is no load on the server. The problem is tomcat is not clearing idle connections or timing out the db connections. I still cannot understand how tomcat work directory fill up with 6GB of space in 24 hours. kapil -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 19:43 To: Tomcat Users List Subject: RE: tomcat tuning the error is that you have a limited number of file descriptor. so it doesn't look like your db pool is causing the problem, but your OS configuration. Increase the number of file descriptors for your system Filip -Original Message- From: Kapil Sharma [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 11:04 AM To: [EMAIL PROTECTED] Subject: tomcat tuning Hi Guys, I am facing a performance issue with tomcat 4.1.12 on Solaris. Following is my setup apache 1.3.27 tomcat 4.1.12 ajp 13 Following is my server.xml context for database and tomcat-apache connector ResourceParams name=jdbc/foo parameter nameurl/name valuejdbc:oracle:oci8:@foo/value /parameter parameter namevalidationQuery/name valueselect 1 from dual/value /parameter parameter namemaxIdle/name value0/value /parameter parameter namemaxActive/name value255/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxWait/name value3/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuetest/value /parameter parameter namepassword/name valuetest/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value300/value /parameter /ResourceParams Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=20 bufferSize=2048 connectionTimeout=2 debug=4 enableLookups=false maxProcessors=255 minProcessors=21 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false tcpNoDelay=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Following are the problems. I changed some parameters in the server.xml file to match the number of apache connections. I was also having heavy load on tomcat so I had to increase the database connections. Now the problem is tomcat is not closing the database connections and database pool is filling up. Tomcat filled up the system partition to 100% and threw the following errors for some reason: exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) at java.net.ServerSocket.implAccept(ServerSocket.java:439) at java.net.ServerSocket.accept(ServerSocket.java:410) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe rverSocketFactory.java:107) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java :335) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:483) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:533) at java.lang.Thread.run(Thread.java:536) Can anyone help me with this problem