Connection pool problem
I am looking for a way to assign a minimum number of connection threads to a specific part of my web application. From what I understand the HTTP connector's maxThreads setting applies to everything using that connector. I want to be able to set aside a part of the connection pool for certain requests. My application has many clients that perform automatic download of new files and send status information back to the server. It also has an administration GUI. My problem is when the clients use all available connection threads, there is no more threads left for the admin GUI, thus locking administrators out of the server. I could make the admin GUI a separate webapp, but I don't know if that solves my problem. I am only running one instance of Tomcat on my server (port 80), and I would like to keep it that way. Please advice. Regards Roland Rabben - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection pool problem
From: Roland Rabben [mailto:[EMAIL PROTECTED] Subject: Connection pool problem My application has many clients that perform automatic download of new files and send status information back to the server. AFAIK, there's nothing in the Tomcat configuration that provides per-app (or sub-app) throttling. However, within your webapp, you should be able to keep track of the number of concurrent downloads (e.g., with a static synchronized integer in the associated servlet), and simply reject requests that exceed your desired limit. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL Redirect Question
On 2/17/07, Stanczak Group [EMAIL PROTECTED] wrote: So create a filter or is there one already to use? If you don't want to roll your own: http://tuckey.org/urlrewrite/ HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Performance tuning parameters
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi JR, Based on your description of the problem, as you have looked at everything else, MaxThreads is the only option you have left us with. Further below however you let slip that mod_jk is also involved. Why? This is a really great way to kill performance. You now not only have the scheduling from Tomcat, you also have the same problem with Apache. Two other things to play with are keep-alives - and perhaps trying the tomcat NIO adapter. (This was suggested by 2 other posters) You will really need to disable keepalives for busy sites, or you will need to configure a LOT of threads. On 16/02/2007, at 3:49 PM, j r wrote: I am gleaning from your comments that MaxThreads is the only thing to tweak. Yes I do really have a connection issue. I have millions and millions of connection requests on a very small pool of servers. The app has been tuned constantly over years. I am either bound to buy more servers or tweak tomcat to get more throughput. In reality, I probably need to do both. Why are you running out of connections? How many requests per second are you getting? How long does it take to deal with one request? Do you have keepalives disabled? (The should be if you have so much traffic) Two be honest, the 750 threads are only really going to help you to deal with 'spikes' in traffic - or you have 750 cores to deal with your traffic. At some stage (after you have saturated your backend queues) your application will need to ramp down this number For example, if your machine can only deal with 100 requests per second, and you are receiving 200 requests per second, this will, after about 8 seconds expand over your thread limit. This is of course a simplified model, but the same is true if the application sends requests to the backend which can only deal with x requests per second. I would run a 'ps auxH |grep -c java' every minute (or perhaps even every 10 sec) to see what is going on - I would suggest that you probably have a cyclical number of connections. I would possibly do the same with apache as well, as you will probably have the same problem here. On a large pageview day, we will overflow the 750 MaxThreads. This is noticed by the MaxThreads limit being exceeded error message. We have tweaked all pieces of the tomcat config. I was hoping a post here could get more explanation of the parameters. We have our experience to fall back on, but I was hoping for more. I would seriously suggest monitoring the number of threads you are using - - as 750 connector threads does not really sound healthy - - and I hope you running this on Linux with so many threads... If MaxThreads is the main thing to tweak, we will continue doing so. There is a limit to this though. You should create the funnel for customer requests (webserver limits, mod_jk limits, and tomcat limits). Exploding MaxThreads to a large number just to be large does not seem to fit with having an acceptCount value or the funnel that should be created. I honestly do not believe that 'tweaking' MaxThreads will do anything other than to help you get around 'spikes' in your traffic. One of the sites I am working for also has millions of requests, and our thread count varies from 200 threads at any one time (based on a complicated backend) to 90 threads on a simple tomcat logging application. I would also recommend separating your static/ image traffic from your dynamic content - using separate urls. Regards Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF2N90W126qUNSzvURAooQAJwKWtXqkp+WgatZ/jT2gFu7OOSBoACdG2kG izsIiWZQssyAHG+Kbd2jwBk= =CsVm -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't find classes in jar files in WEB-INF
It should be noted there are only a couple of places .jar files are allowed in tomcat: 1. WEB-INF/lib 2. common/lib of the tomcat installation directory WEB-INF itself is not checked or scanned for .jar files at all. In addition, any files in the classes directory will override their equivalent in the lib directory. This occurs regardless of it being in WEB-INF/classes or common/classes As to the issue below, are you sure you don't have similar classes (in name and package) in both common/lib and WEB-INF/lib? Seems like there's a classloader issue at work here. Take a look at the classloader howto at http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html. It might offer some ideas. --David aladdin wrote: When I put my webapp.jar file in the WEB-INF directory, it doesn't find the app. When I exploded it into the classes directory, and associated subdirectories, they are found fine, but I get this problem (the one below). This, it turns out, is triggered by the fact I have the webapp.jar file in the lib directory and all the classes unpacked in the classes directory (both under WEB-INF, of course). Getting rid of the webapp.jar file in the lib directory solves the problem below, but now tomcat won't use that the jar file in the lib directory, even though when it's unpacked in the classes directory, he seems perfectly happy. Is there some magic I need for tomcat to use .jar files in the WEB-INF/lib directory, like an entry in web.xml or server.xml? On Friday 16 February 2007 22:52, aladdin wrote: I was getting a message like SEVERE PersistenceManager persistence not enabled, or something like that (I don't remember) so I disabled (commented out) the Manager tag in server.xml that configured the PersistenceManager. Now, I'm getting Feb 16, 2007 9:26:34 PM org.apache.catalina.loader.WebappClassLoader modified INFO: Additional JARs have been added Feb 16, 2007 9:26:34 PM org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started over and over in the log files. Anyone know what's causing this? I thought maybe tomcat was restarting, but the PID doesn't change. It seems to work, but it's filling up my log files. TIA - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL Redirect Question
That's it. thanks. Hassan Schroeder wrote: On 2/17/07, Stanczak Group [EMAIL PROTECTED] wrote: So create a filter or is there one already to use? If you don't want to roll your own: http://tuckey.org/urlrewrite/ HTH, -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't find classes in jar files in WEB-INF
Thanks for the tip! I don't think I'd have a conflict with all the classes in my application. Although some of my classes have common names, like user.java (compiled, of course, to user.class), they are all member of just one of three packages: infoisland, dbMgr, and utils, so I don't think the names are colliding. Loading the app bombs out as tomcat is loading when it can't find my filter, CheckUser (makes sure users are logged in), which is in the infoIsland package. However, your comment is telling: WEB-INF itself is not checked or scanned for .jar files at all. So, if I make sure the WEB-INF/classes subdirectory is empty, how do I tell tomcat to go get classes out of the WEB-INF/lib/whatever.jar file? Thanks. On Sunday 18 February 2007 20:05, David Smith wrote: It should be noted there are only a couple of places .jar files are allowed in tomcat: 1. WEB-INF/lib 2. common/lib of the tomcat installation directory WEB-INF itself is not checked or scanned for .jar files at all. In addition, any files in the classes directory will override their equivalent in the lib directory. This occurs regardless of it being in WEB-INF/classes or common/classes As to the issue below, are you sure you don't have similar classes (in name and package) in both common/lib and WEB-INF/lib? Seems like there's a classloader issue at work here. Take a look at the classloader howto at http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html. It might offer some ideas. --David aladdin wrote: When I put my webapp.jar file in the WEB-INF directory, it doesn't find the app. When I exploded it into the classes directory, and associated subdirectories, they are found fine, but I get this problem (the one below). This, it turns out, is triggered by the fact I have the webapp.jar file in the lib directory and all the classes unpacked in the classes directory (both under WEB-INF, of course). Getting rid of the webapp.jar file in the lib directory solves the problem below, but now tomcat won't use that the jar file in the lib directory, even though when it's unpacked in the classes directory, he seems perfectly happy. Is there some magic I need for tomcat to use .jar files in the WEB-INF/lib directory, like an entry in web.xml or server.xml? On Friday 16 February 2007 22:52, aladdin wrote: I was getting a message like SEVERE PersistenceManager persistence not enabled, or something like that (I don't remember) so I disabled (commented out) the Manager tag in server.xml that configured the PersistenceManager. Now, I'm getting Feb 16, 2007 9:26:34 PM org.apache.catalina.loader.WebappClassLoader modified INFO: Additional JARs have been added Feb 16, 2007 9:26:34 PM org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started over and over in the log files. Anyone know what's causing this? I thought maybe tomcat was restarting, but the PID doesn't change. It seems to work, but it's filling up my log files. TIA - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't find classes in jar files in WEB-INF
can we see your filter and filter-mapping entries in your web.xml M- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: aladdin [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, February 18, 2007 9:46 PM Subject: Re: Can't find classes in jar files in WEB-INF Thanks for the tip! I don't think I'd have a conflict with all the classes in my application. Although some of my classes have common names, like user.java (compiled, of course, to user.class), they are all member of just one of three packages: infoisland, dbMgr, and utils, so I don't think the names are colliding. Loading the app bombs out as tomcat is loading when it can't find my filter, CheckUser (makes sure users are logged in), which is in the infoIsland package. However, your comment is telling: WEB-INF itself is not checked or scanned for .jar files at all. So, if I make sure the WEB-INF/classes subdirectory is empty, how do I tell tomcat to go get classes out of the WEB-INF/lib/whatever.jar file? Thanks. On Sunday 18 February 2007 20:05, David Smith wrote: It should be noted there are only a couple of places .jar files are allowed in tomcat: 1. WEB-INF/lib 2. common/lib of the tomcat installation directory WEB-INF itself is not checked or scanned for .jar files at all. In addition, any files in the classes directory will override their equivalent in the lib directory. This occurs regardless of it being in WEB-INF/classes or common/classes As to the issue below, are you sure you don't have similar classes (in name and package) in both common/lib and WEB-INF/lib? Seems like there's a classloader issue at work here. Take a look at the classloader howto at http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html. It might offer some ideas. --David aladdin wrote: When I put my webapp.jar file in the WEB-INF directory, it doesn't find the app. When I exploded it into the classes directory, and associated subdirectories, they are found fine, but I get this problem (the one below). This, it turns out, is triggered by the fact I have the webapp.jar file in the lib directory and all the classes unpacked in the classes directory (both under WEB-INF, of course). Getting rid of the webapp.jar file in the lib directory solves the problem below, but now tomcat won't use that the jar file in the lib directory, even though when it's unpacked in the classes directory, he seems perfectly happy. Is there some magic I need for tomcat to use .jar files in the WEB-INF/lib directory, like an entry in web.xml or server.xml? On Friday 16 February 2007 22:52, aladdin wrote: I was getting a message like SEVERE PersistenceManager persistence not enabled, or something like that (I don't remember) so I disabled (commented out) the Manager tag in server.xml that configured the PersistenceManager. Now, I'm getting Feb 16, 2007 9:26:34 PM org.apache.catalina.loader.WebappClassLoader modified INFO: Additional JARs have been added Feb 16, 2007 9:26:34 PM org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started over and over in the log files. Anyone know what's causing this? I thought maybe tomcat was restarting, but the PID doesn't change. It seems to work, but it's filling up my log files. TIA - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]