Re: Restart TC with cron/sh
On 07/07/2008, at 4:11 PM, Piller Sébastien wrote: Yes, we're running Linux. I'm not sure what's my distrib. I'm using our dedicated hosting, administrated via ssh. When I need to start tomcat, I just use the startup.sh script (the one in /bin/). Same to shutdown: use shutdown.sh. It's possible to restart TC with a .sh, isn't it? Dear Sébastien, You can use cron to stop and restart tomcat every day - A little bit of shell scripting may be required. The apache distribution of tomcat can be stopped and started by using cd $TOMCAT_HOME ./bin/shutdown.sh ./bin/startup.sh (some developers ASSUME that $TOMCAT_HOME is the working directory) As you are already having memory difficulties though, you may find that shutdown.sh does not work correctly - and that you may need to use kill -9. Either way however, should you be using this tomcat for a 'commercial purpose' running on a '*nix' machine, I can only strongly recommend that you find someone who can administer this machine. Best of luck. Andrew - 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: Apache and Tomcat
On 25/06/2008, at 17:43, Steve Ochani [EMAIL PROTECTED] wrote: I know this may sound naïve but is it possible to have tomcat and apache running off the same port - 8080. No, TCP only allows one port per service. You can let apache httpd use 8080, move tomcat to something else and use mod_proxy_ajp to forward the requests through httpd - although as the above poster mentioned - why do you want to use apache when you have iis installed? I have iis running on port 80 and do not have another server to install apache and tomcat.7 Then you can front end tomcat with iis. Andrew - 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: JMX Perform GC TOMCAT 5.5.23
On 04/06/2008, at 4:15 PM, karthikn wrote: We notice Constantly JAVA is 100% CPU utilization. I am coming in late on this - what OS are u running? How are you seeing the 100% CPU utilization, with top? If you have a multiprocessor machine, you may find that top always shows 100% when the total of the process time on each processor added together is greater than 100% ie.. cpu 1: 30% cpu 2: 30% cpu 3: 30% cpu 4: 30% - Top shows 100% if you see cpu 1: 30% cpu 2: 100% cpu 3: 30% cpu 4: 30% you probably have at least one infinite loop somewhere in your code... while top is running, press '1' and you will see a list of cpus at the top (debian linux) or try running sar: sar -P ALL 1 Cheers Andrew smime.p7s Description: S/MIME cryptographic signature
Re: R: How to close idle connections
On 28/04/2008, at 4:59 PM, Alan Chaney wrote: David Smith wrote: No, I have at most 20 idle connections, that's goes right, but my boss want less idle connections to avoid to overload the database server. So there isn't way to close an idle connection to remove the relative process? If so, I will set maxIdle=2 and everyone will be happy (expecially me :) I'll bet money the added, idle postgres connections are just sleeping while they wait for work. Given idle connections contribute virtually no additional load, don't see his argument that idle connections contribute to a database overload. If the minor increase in overhead due to sleeping threads actually overloads the database, you need to let your boss know the server hardware is way too frail for production use and needs to be upgraded. --David Agreed. I use postgres and with ps alx | grep postgres each connection shows as idle (when its not being used!) and consumes about 140k bytes of memory. On a modern server that can hardly be considered as any use at all! This sounds as if it is out of a Dilbert comic. Paint it red, that way it will go faster. Actually, reducing it will if anything make it slower due to increased latency when the application does actually need the additional connections. That being said and done, setting number of idle procs to 1000 isn't such a good idea either. ^^ Andrew smime.p7s Description: S/MIME cryptographic signature
Compiling jni/native on Debian Etch
Dear List, has anyone else tried to compile apr and the native tomcat libraries on etch? debian40-64:/usr/local/src/tomcat-native-1.1.12-src/jni/native# ./ configure --with-apr=/usr/local/apr --with-java-home=/usr/local/java I get loads of messages including ./configure: line 5472: JAVA_HOME: command not found ./configure: line 5473: JAVA_PLATFORM: command not found ./configure: line 5474: JAVA_OS: command not found ./configure: line 5475: CC: command not found ./configure: line 5476: CFLAGS: command not found ./configure: line 5477: LDFLAGS: command not found ./configure: line 5478: CPPFLAGS: command not found ./configure: line 5479: ac_ct_CC: command not found ./configure: line 5480: EXEEXT: command not found ./configure: line 5481: OBJEXT: command not found ./configure: line 5482: so_ext: command not found ./configure: line 5483: lib_target: command not found ./configure: line 5484: TCNATIVE_LIBNAME: command not found ./configure: line 5485: EXTRA_OS_LINK: command not found ./configure: line 5486: TCNATIVE_EXPORT_LIBS: command not found ./configure: line 5487: TCNATIVE_PRIV_INCLUDES: command not found ./configure: line 5488: TCNATIVE_INCLUDES: command not found ./configure: line 5489: TCNATIVE_LDFLAGS: command not found ./configure: line 5490: TCNATIVE_LIBS: command not found ./configure: line 5491: INCLUDE_RULES: command not found ./configure: line 5492: INCLUDE_OUTPUTS: command not found ./configure: line 5493: LIBOBJS: command not found ./configure: line 5494: LTLIBOBJS: command not found at the end. It seems to compile and work - but I am not happy about all the errors - and yes, I tried setting 'JAVA_HOME' but this made no difference COnfused.. Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat 5.5 and keep-alive and http connector
On 02/04/2008, at 6:02 PM, Andrew Miehs wrote: On 02/04/2008, at 5:51 PM, Caldarale, Charles R wrote: It appears that the chart at the bottom of the above page answers your question, unless I'm misreading it. Since there is no NIO connector in 5.5, it looks like you'll need a very large maxThreads value or set up the APR connector (or move to Tomcat 6, which is what I'd do). Put another way: Does tomcat a) Assign a connection to a single thread and only use this thread for the connection until the connection is closed? or b) Assign a request to a thread, and return the thread back to a controlling thread on completion of the request? My understanding is that the answer is 'A' except for the case of NIO and Tomcat 6. BTW: The last thing I heard is that APR is still recommended for performance and stability over TC 6 NIO - or do you have any newer info? Regards Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Threads
From: Stephen Caine [mailto:[EMAIL PROTECTED] I have a process that generates hundreds of threads. Running on Mac OS X 10.5.2 Server, the thread count tops out at approximately 2500. After which, the process is terminated. The heap size is set to 1 gigabyte. My question is how to increase the capacity of the JVM to handle more threads. Is the value of 2500 an absolute limit, or can it be modified by setting the thread allocation, increasing heap size or the use of another java option? What error message are you seeing in catalina.out? You are probably running out of memory. Each thread needs a certain amount of heap and stack. You may also want to look at the limits you set in the shell Defaults from mac os x 10.5.2 $ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) 6144 file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 256 pipe size(512 bytes, -p) 1 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 266 virtual memory (kbytes, -v) unlimited $ smime.p7s Description: S/MIME cryptographic signature
Re: [OT] Threads
On 03/04/2008, at 7:14 PM, Christopher Schultz wrote: Alan Chaney wrote: | Actually another question is what is it in your application that NEEDS | 2500 threads? Ooh! I know... it's a ray-tracer that goes ral fast if you give each output pixel its own thread. More threads = faster, right? Hoo-ray for threads! Doh! and I thought he had 2500 processors!... Silly me. Andrew smime.p7s Description: S/MIME cryptographic signature
Tomcat 5.5 and keep-alive and http connector
Dear List, How does enabling keep-alives effect the number of threads required by tomcat? Assuming: maxKeepAliveRequest = -1 1000 online users - each with 2 connections Does this mean that I will have 2000 threads open - one per connection? ie: Is the the connection assigned a thread until the connection is closed? Or are the connections only assigned to the thread during the request period? The only thing I could find related to this was from the Tomcat 6.0 documentation on http://people.apache.org/~fhanik/http.html ... Each incoming request requires a thread for the duration of that request. If more simultaneous requests are received than can be handled by the currently available request processing threads, additional threads will be created up to the configured maximum (the value of the maxThreadsattribute). If still more simultaneous requests are received, they are stacked up inside the server socket created by the Connector, up to the configured maximum (the value of the acceptCount attribute. Any further simultaneous requests will receive connection refused errors, until resources are available to process them. Although there is no mention here of 'connections' - or is this specific to the NIO modification for the tomcat 6 connector? Thanks for any help, Regards Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat 5.5 and keep-alive and http connector
On 02/04/2008, at 5:51 PM, Caldarale, Charles R wrote: From: Andrew Miehs [mailto:[EMAIL PROTECTED] Subject: Tomcat 5.5 and keep-alive and http connector The only thing I could find related to this was from the Tomcat 6.0 documentation on http://people.apache.org/~fhanik/http.html It appears that the chart at the bottom of the above page answers your question, unless I'm misreading it. Since there is no NIO connector in 5.5, it looks like you'll need a very large maxThreads value or set up the APR connector (or move to Tomcat 6, which is what I'd do). I looked at the chart - but was not quite sure if it really answers my question... Are the threads assigned permanently to a connection? or can one thread be used for multiple connections? Andrew smime.p7s Description: S/MIME cryptographic signature
[OT] Re: Top mail servers
On 28/03/2008, at 8:47 PM, Srivastava, Abhay wrote: Thanks a lot Guys. So is Exim better than Sendmail in terms of robustness and faster service? It very much depends on what you want to do. I am a big postfix fan - exim is supposedly also great. qmail is also very good. But these are only MTAs. Do your users also need to read the mails - or is this only for forwarding messages? Andrew smime.p7s Description: S/MIME cryptographic signature
Re: [OT] Re: Top mail servers
On 28/03/2008, at 10:40 PM, Srivastava, Abhay wrote: Hi Andrew, I dn't have experience with either of them. SO which one do you suggest should be a good selection to start with ? I prefer postfix - simple and fast and its what I know. My users don't be reading the mails right now. But, yes I don't want to restrict that functionality. If you are only forwarding mails to other domains from your server - any of postfix, exim or qmail would be ok. If you want to start delivering mail locally so people can read it on your sevrers via Pop3/ IMAP - then it gets a lot more complicated - and you will need to look at things like Courier and Cyrus. Cheers Andrew smime.p7s Description: S/MIME cryptographic signature
Re: best option Load Balancing
On 25/03/2008, at 6:47 AM, karthikn wrote: Users 500+ ( Traffic increasing day by day ) You mentioned these were WLAN users - This number is irrelevant for your performance info - what was much more important was the 25/ 30 logins per second. O/s Unix 11 JSDK =1.6 TOMCAT 5.5.23 (multiple) Multiple tomcats on the same machine or not? running 2 tomcats with the same app on the same machine will NOT make it quicker, unless you have written the whole thing single threaded. Should this be the case, I would suggest go back and look at the code - if you can. The question is how fast is your machine Most modern hardware should be able to deal with this load easily. Have a look at http://www.theserverside.com/tt/knowledgecenter/knowledgecenter.tss?l=LoadBalancingTomcatApache This should give you a good start in answering your questions. Cheers Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Please Need Help ...... :(
On Mon, 2008-03-24 at 19:00 +0530, karthikn wrote: Problem Load on this single TOMCAT is building up the CPU for 100% ,as the subscribers are increasing. How many users are we talking about here?! That is a a LOT of users for the 5 or 6 requests before they are authenticated? How many authentications are you doing a second?! Solution We need to bring in the Load Balancer with Multiple TOMCAT /APACHE2.x server. Hence we need multiple TOMCAT with ROOT being able to configure to a APCHE 2X http server. Is this possible ? Yes this is all possible with multiple solutions, but how big is this setup? How many Access Points are being served by 1 server? Or is this a country wide setup. You must be authenticating a lot of users per second - With current hardware you should be able to do about 100 users per second relatively easily - That is 100 users LOGGING on every second - Thats one big access point. Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Please Need Help ...... :(
On 24/03/2008, at 3:09 PM, karthikn wrote: Hi Thx for the reply We need to Configure TOMCAT 's ROOT to APCHE2.x for Load balancing. mod_proxy_ajp Problem Load on this single TOMCAT is building up the CPU for 100% ,as the subscribers are increasing. Read other mail from me. Solution We need to bring in the Load Balancer with Multiple TOMCAT /APACHE2.x server. If you can't fix the software another way - I guess so. Hence we need multiple TOMCAT with ROOT being able to configure to a APCHE 2X http server. Is this possible ? Yes - mod_proxy_ajp - but I am pretty sure this is NOT what you want to do. Why do you keep insisting on using Apache HTTPD for this? Tomcats HTTP connector is more than capable - and faster than an mod_proxy/ tomcat combination - just use some form of load balancer in front of it. Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Please Need Help ...... :(
On 24/03/2008, at 3:14 PM, karthikn wrote: How many users are we talking about here?! About 500+ users and increasing every month Total users online - ok - not a probelm How many authentications are you doing a second?! Since this is a WIFI / AAA application for Students locally on University campus Per/sec it may be 25 - 30 users on High traffic uses. 30 per second?!@ I could authenticate them by hand that quickly How many Access Points are being served by 1 server? Or is this a country wide setup. This is currently 1 UNIX HP 11 setup with 2 cpu's and this is for a Local University Campus How old is this HP? When you set up the second and third tomcat - will this be on the same machine, or a different machine? If it can't handle 30 req per second and still have time to calculate pi to 1 decimal places then there is something wrong... We would like to use APACHE2.x with multiple TOMCAT (ROOT hosted web application) as configuration Is this Possible This is a recorded message Yes this is possible Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat 6.x for 64 bit OS
On 02/01/2008, at 3:43 PM, Gregor Schneider wrote: The official Apache-solution is imho - get the sources at http://ftp.hosting-studio.de/pub/linux/apache/tomcat/tomcat-6/v6.0.14/src/apache-tomcat-6.0.14-src.zip - compile it on your 64bit-platform using a 64bit-JDK using the provided Ant-build-script Actually - the official Apache solution is to download it from here... http://tomcat.apache.org/download-60.cgi No need to recompile it. CHeers Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Enhancing Tomcat Speed
On 22/12/2007, at 3:45 PM, Pid wrote: Richard Reyes wrote: Hi All, Please send suggestions on how to improve the tomcat performance. Do you mean that you want to improve Tomcat's performance, or the web application(s) you are deploying on Tomcat? I think he wants us to do his homework A) Buy a faster machine B) Buy better programmers C) Work out 'what' is slow - App CPU Bound, Disk Bound, Just hangs?! Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat 4.1.31 crashing with memory errors, crashing with no errors and shutting down cleanly without manual intervention
On 06/12/2007, at 10:34 PM, Sean Carnes wrote: The highest that we could set the heap was to 1200. I tried higher and it would not start. It also seemed somewhat unstable above 1024 which was the previous setting, slowness updating the client and other things. The company that develops the enterprise s/w that uses tomcat said that settings over 1024 were unstable so my feeling was confirmed by them. We use an snmp agent to our nms to get system statistics. There was nothing out of the ordinary, other than tomcat using about 1298M which is the most that we have seen it use. We have everything up and running now and we are load balancing which is how it should have been set up in the first place. The memory usage of tomcat has dropped ~40% since we made that change. It was normally using between 600M 800M now its down to about 4-500M give or take. Hi Sean It seems as if it sort of works at the moment by the sounds of this... Things you can try when you are board and have time: - Does Windows JVM 1.42 have jstat ? - Try upgrading to JVM 1.5 - (linux if not available on windows) - run jstat every minute and you should be able to get a good look at users vs. memory to see if this is really the problem. And definitely - upgrade to the 64 bit JVM as soon as possible - RAM is cheap Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat 4.1.31 crashing with memory errors, crashing with no errors and shutting down cleanly without manual intervention
On 06/12/2007, at 5:12 PM, Peter Crowther wrote: From: Sean Carnes [mailto:[EMAIL PROTECTED] The back-end servers seem to be responding in a timely fashion right now. We have performance data from the time period and nothing seems abnormal. I unfortunately missed the first part of this thread ... If you are having problems and your performance data show nothing abnormal, then you either do not have enough data or you do not have a problem.. :-) What errors are you seeing? (What is in catalina.out)? Are you running out of threads? (you are probably runing JVM 1.42 based on the version of tomcat you are running - Sun and IBM JVM 1.42 used to respond with Out of memory when you were out of threads)... Have you done a stack trace on the tomcat? Do you have disk performance stats from the backend as well as CPU, and load? At the moment, it could be anything, but if you say you have 50% more users, this something could very easily be the effect of a little more load, which brings the whole thing to a standstill Cheers Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat 4.1.31 crashing with memory errors, crashing with no errors and shutting down cleanly without manual intervention
Do you also have performance data for the front end machines? What OS are you running? Would definitely recommending installing sar (or sysstat package) if you are running linux. If Linux, which kernel? If it really is heap, have a look at: http://hausheer.osola.com/docs/5 for a simple description on how to fix this... Below is the google link which shows how this was found http://www.google.com/search?rls=en-usq=java.lang.OutOfMemoryError:+Java+heap+spaceie=UTF-8oe=UTF-8 The thing I am wondering also is why it shuts down cleanly sometimes. Is there something internally that triggers that with this version of Tomcat, would an out of heap memory situation cause that. Maybe its in one of the logs but I am still going through all of them. There are multiple megs of them. Are you sure it shuts down cleanly - this seems strange - you may want to chnage `ulimit -c 1000` so that you can see whether it really core dumps or not what does `ps auxH` report on your machine? How much memory is the thing using? How high have you configured your memory settings for the JVM? Cheers Andrew smime.p7s Description: S/MIME cryptographic signature
Re: [OT] Release Management and Deployment
On 16/11/2007, at 4:09 PM, Martin Gainty wrote: 2 options-Tried and true Ant which is rock solid reliable, easily configurable and a user-friendly user-list where a resource will respond in 24 hoursmore information available athttp://ant.apache.org/Maven..complex environment with heavy reliance on repositories and plugins..If any attribute is incorrect such as groupId/artifactId/versionor plugin repositories are inaccessible or you have a file system which doesnt support the default repository of .m2 then nothing works whats more there is no user-list (at least from what I've seen thus far) available..On the plus side maven's ability to configure internet site repositories is probably maven's most powerful featurehttp://maven.apache.org/ HTH/ Thanks Martin, Maven and Ant are both great tools - they are great for building a Release and Deployment platform, but in the are not that in themselves. I probably should have said that I am looking for a web based system, than can use whatever - maven, ant, make, shell... but provides a friendly environment to track releases, publish software, etc... Thanks Andrew smime.p7s Description: S/MIME cryptographic signature
[OT] Release Management and Deployment
Dear Tomcat users, I was wondering if there are any out of the box release management and deployment solutions available for Tomcat. It is not a problem to create scripts/ web pages to do all of this, but is there a better solution out there, so that people with command line allergy can also deploy software? Thanks in advance, Andrew smime.p7s Description: S/MIME cryptographic signature
Re: multiple tomcat processes running on linux
On 15/11/2007, at 4:31 PM, Palat, Anil wrote: -Tomcat 5.0.16 -Red Hat Enterprise Linux AS release 3 (Taroon Update 4) 2.4.21 32.0.1.ELsmp (32-bit) When I give ps -ef | grep tomcat, it shows multiple processes running all of them grabbing majority of the available memory You are running on an old 2.4 kernel - and you are only seeing 1 process and lots of threads... Update to a 2.6 kernel as soon as possible if you want to do anything serious with Tomcat. As for the memory - It uses as much as you tell it to use. Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Apache/Tomcat/mod_jk over WAN
On 13/11/2007, at 6:47 AM, nirmala wrote: hi I have one question I want to installation procedure for the apache tomcat5.5 version in windows XP Cick, then click, then click, then click. Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat - threads / throughput limits?
On 08/11/2007, at 4:51 PM, Jim Cox wrote: On Nov 8, 2007 10:41 AM, [EMAIL PROTECTED] wrote: In resolving our current bottleneck i used JProfiler to see what the tomcat applications were doing and when under high load there are a lot of threads which are blocked on this: org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() This suggests that they are spending all their time waiting for tomcat to run them, either way they're not runnable anyway. http80-Processor131 daemon prio=5 tid=0x00baa7c0 nid=0x10f9 in Object.wait() [0xa5e81000..0xa5e819c8] at java.lang.Object.wait(Native Method) - waiting on 0xc9d99d20 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) FWIW, I always interpreted those as HTTP servicing threads waiting for something to do (i.e. not a bad thing at all). Have you tried running your profiler against a tomcat not doing ANY requests? I agree with Jim on this one - These are threads WAITING on a connection... and not doing anything. Have a look in tomcat manager, and then you can see how many 'free' connections you have. Cheers Andrew smime.p7s Description: S/MIME cryptographic signature
Re: [OT] Tomcat causing high CPU load
On 08/11/2007, at 6:29 PM, Bob Riaz wrote: Thanks. StringBuilder seems to be the most popular suggestion! I'm going to implement this and report on any changes I see in Tomcat's behavior. I'm also looking at other possiblities, such as Tomcat's I/O activities causing thrashing if I/O is excessive. Would anybody know how I could monitor Tomcat's I/O activities? Also, is there a way to configure Tomcat so that a connection times out after a certain period of time? Thanks to everyone for your attention and help. Bob Hi Bob, You should really have a look at http://tomcat.apache.org/tomcat-6.0-doc/config/http.html I will leave how to configure the timeout as an exercise for the reader. :-) Regards Andrew smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat causing high CPU load
Hi Bob, Kill -3 TOMCAT PID Will produce a stack trace in catalina.out This problem is VERY most probably your code, and not tomcat, but a stacktrace should show this. ps auxwh will also give you an indication, its probably just 1 thread pushing you to such a high load. As for walking through the code - don't forget this stuff is multithreaded so its not so easy to walk through... My bets are on an unsynchronized HashMap. Cheers Andrew On 05/11/2007, at 10:44 PM, Sai Bobba wrote: Many thanks. We've had several developers walk through the code to try to catch the possibity that the app may be sitting in a loop in some situations. The code seems ok, and, as I indicated, we've never been able to reproduce the situation. I've searched the web for taking thread dumps, as I don't know how to do that, butg haven't been able to find anything. Perhaps you could give me a pointer if you have the time. Thanks again for your attention. Bob - 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: Tomcat crash @ midnight - but why?
Are you using Log4j in your application? It has the option to do daily (midnight) rotates on log files... Oh - and you may want to have a serious talk with the cleaning lady, not that she unplugs the server for the vacuum cleaner.. ^^ Cheers Andrew On 26/09/2007, at 6:11 PM, Christopher Schultz wrote: Martin Cavanagh wrote: just to to check - there is no hidden setting in Tomcat which says - shut me down at midnight sometimes for an inexplainable reason? I think they removed that in 5.5.23, so you should be safe. It was fun while it lasted ;) - 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: Recovery from OutOfMemoryError?
On 01/08/2007, at 3:44 PM, Christopher Schultz wrote: I'm guessing he's running a webapp, and that one of the request worker threads got an OOME. Most webapp requests are idempotent (or should be), and those that aren't are generally wrapped around database or other transactions. Assuming I'm right (which is frequently dangerous), one failed request should not affect the rest of the application. Any locally-instantiated objects should be ripe for collection, including any of the big ones that probably caused the OOME in the first place. The server should keep going, right? It sounds as if the original poster doesn't really have much to say about how the thing is programmed, and is trying to find a solution to his problem, which is being called at 3am. Swatch keeping its eyes on catalina.out and then calling killall -9 java, ./bin/startup.sh should solve this. As for the rest of the memory issues - Catching OOM doesn't help you really, as Tomcat does not catch OOM - it throws it all the way up to the top, at which stage the JVM dies. IE: Your thread uses all the memory - tomcat now receives a new request, tries to allocate memory for a new object - poof. Even though your code deals nicely with the OOM situation, tomcat doesn't. Cheers Andrew PS: I can't wait for the day where Java gets pointers and the sizeof operator... smile - 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: Recovery from OutOfMemoryError?
On 01/08/2007, at 6:50 PM, Mark H. Wood wrote: Would you (or anyone) care to provide a link to where I can learn more about swatch? Everything I've turned up so far points to a wanna-be replacement for UTC called internet time promoted by a watchmaker. http://swatch.sourceforge.net/ http://sourceforge.net/project/showfiles.php?group_id=68627 Cheers Andrew - 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: Tomcat with 8 GB memory
On 31/07/2007, at 2:04 PM, Mohan2005 wrote: so now we have to identify if our application is 64bit compatible or 32bit compatible. If your application is only JAVA, then no porting is required. Andrew - 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: Recovery from OutOfMemoryError?
On 31/07/2007, at 6:52 PM, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. I'd thought of the log watcher, but that seems a rather blunt instrument; I was thinking there might be some kind of Tomcat (or JVM) intrinsic mechanism for this. How much heap space do you have set?! Why don't you just increase it? If not, why not decrease the number of users you allow onto the server? Restarting Tomcat is even more 'blunt' then allowing access to fewer users... Confused... Andrew - 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: Recovery from OutOfMemoryError?
On 31/07/2007, at 7:19 PM, Caldarale, Charles R wrote: From: Craig Berry [mailto:[EMAIL PROTECTED] Subject: RE: Recovery from OutOfMemoryError? It depends on what the user chooses to do during the session. Again, try another point of view. It's what the webapps choose to do in response to user requests that provoke the problem. Is there some spot in your code that's making a grab for a big array and failing to handle the possibility of allocation failure? Or have you simply over-configured the number of connector threads for the size heap you're running? I would also strongly agree with the fix the problem solution, but if you really want to 'kick' your users out - then have a look at swatch. IIRC it can perform a task on receiving a log message. Cheers Andrew - 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: Recovery from OutOfMemoryError?
On 31/07/2007, at 7:39 PM, Marco wrote: Dear Craig, You are familiar with, even with enough systemmemory, JVM uses limited memory? I your application consumes much memory, you could change settings in the tomcat6.conf file: #JAVA_OPTS=-Xminf0.1 -Xmaxf0.3 JAVA_OPTS=-Xmx1024M -Xms512M mx and ms should be the same for a server application. And as mentioned by someone earlier, you will probably want to increase MaxPermSize as well. -Xmx1500m -Xms1500m -XX:MaxPermSize=256m Cheers Andrew - 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: Tomcat with 8 GB memory
On 30/07/2007, at 8:02 AM, Peter Stavrinides wrote: Apologies Ron this was supposed to be directed at Andrew Miehs! Peter Stavrinides wrote: From your comments Ron you obviously didn't understand a thing I wrote, because you have just repeated me! Dear Peter, Obviously! :-) On 29/07/2007, at 2:34 PM, Peter Stavrinides wrote: This is currently where the true benefit of switching to a 64- bit processor lays, it has nothing to do with the memory address space, which is exactly that, just space for more complex computations I was mainly referring to this sentence. It is NOT true to say that it has nothing to do with memory space. Some of our Java processes are running 12G RAM - this would not be possible with 32bit - at least not with Java. (Yes it could be done with multiple processes and some for of communication between them) Memory space is ONE of the factors - and to be honest the one that was more important for our application than the 15% speedup. Regards Andrew - 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: Tomcat with 8 GB memory
On 29/07/2007, at 9:08 PM, David Smith wrote: ...but people advice that 64bit are 20 - 30% slower than the 32bit ... Could these people offer any evidence to this? Cite any benchmarks? I would like to see the evidence of this before believing it to be true. We did test with out application - (running more than 10 tomcats using F5s for Load balancing) and came to the belief that we could deal with 15% more users online at the same time. As I said, though, this was OUR application - maybe yours is different... For our purposes however we also found Intel 5160s packed more punch per $ than AMD Opterons - (Thankfully we don't have to worry about paying the power bills in our colocation)... Cheers Andrew - 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: Tomcat with 8 GB memory
On 27/07/2007, at 12:19 PM, Joe Nathan wrote: Christopher Schultz-2 wrote: Joe Nathan wrote: I would discourage to use such machine! 8GB means you are using 64 bit machine which will be much slower than 32 bit machines. Huh? Why would a 64-bit machine run slower than a 32-bit machine? Overall performance depend on many things: CPU speed, number of CPUs, memory size, I/O, especially, virtual memory paging, network interface bandwidth 64bit machines come with better capacity except cpu computation speed! I think what is being forgotten here is that is not a 32bit vs 64bit theoretical discussion, but rather a comparison of AMD64 vs i386 Sun Java 1.5 64bit has always been quicker in my tests than the 32bit variation - both running on Debian, both with a similar 2.6 kernel. AMD64 has a lot more and longer registers than i386 - and I could imagine that the results I have seen are based on this difference.. ... Otherwise 64bit machines suck! That;s why 64bit Windows is not popular. I don't them many shops selling! I would assume that is because A) You need twice as much memory for everything B) Limited drivers available C) Games not 64bit... Performance isn't the issue here... Andrew - 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: Tomcat with 8 GB memory
On 26/07/2007, at 10:57 AM, Joe Nathan wrote: I would discourage to use such machine! 8GB means you are using 64 bit machine which will be much slower than 32 bit machines. Big memory is useful ONLY if you have applications that can benefit big memory such as database systems. In Java, if you use lots of memory and create lots of objects, your Java applications will have periodic seisures! This is because of garbage collection will take significant time, if started. Dear Joe - I have more than 1 or 2 of these machines (16GB RAM, 6GB for Tomcat). The Sun 64bit JVM 1.5 is about 15% faster than the 32bit for our application. (Running under Tomcat) I would be happy with 1 ~ 2 GB 32bit machines! This could deliver much faster services. Java eats memory... The more memory you have, the more you can cache and the less you need to annoy your backend. Andrew - 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: Encrypt Tomcat 4.1 log and log4j.properties log with MD5
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/06/2007, at 12:53 PM, Johnny Kewl wrote: Why? No, do it some other way, I think this will get horribly complex. On windows I think near impossible, short of placing a symmetrical alg in the source. What about normal protection, in essence the server starts up as a user, and only that user has access to the log folder, naturally admin can still get in. Why do this? Hiding stuff from admin? What is there to hide? Sounds like someone is storing Credit Card details on their web servers This sounds like a public/ private key solution is necessary - where only people with the private key can decrypt the files, but the server can still encrypt them with only the public key... Cheers Andrew I think turning logging off is possible, when playing with the properties, I've managed to do that by accident a few times. Think you need to explain more, maybe can find another way I dont think this is an option. - Original Message - From: Yulius [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, June 20, 2007 12:06 PM Subject: Encrypt Tomcat 4.1 log and log4j.properties log with MD5 Hi, I'm currently need to do the encryption towards the log files that has been created by the webserver and the webapplication, so that only those who has the password to decrypt the log files can read them. Is there a way to solve this issue? Thanks in advance Yulius -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD4DBQFGeQhkW126qUNSzvURAsJnAJ94zCJsPp3JSQ3BdI/K7mHetbjmRQCXZdzz UVU01WBh63oQ4qPw8MG1XA== =XBQm -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: How can i configure tomcat to avoid threads error in tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 19/06/2007, at 3:25 PM, Prashant Thakkar wrote: I am frequently getting this error in tomcat which stops my tomcat service. Pl help me its urgent and costing my service as well: I am getting bellow error in my catalina logs: Jun 19, 2007 5:55:44 PM org.apache.tomcat.util.threads.ThreadPool logFull SEVERE: All threads (250) are currently busy, waiting. Increase maxThreads (250) or check the servlet status Hi Prashant, You may want to increase your 'maxThreads' setting in conf/server.xml Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / You may also want to look at why you have 250 connections open at once Based on the question, It sounds like you have an infinite loop somewhere in your application rather than a lot of traffic, causing the threads to lock up... Cheers Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFGd9u0W126qUNSzvURAiDKAJ4ujmWo8Mnd8jHGQdZnEqBCcuIaGQCfVD30 oa6A6IWqNscwAtejrIvf0tM= =VNFN -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: How can i configure tomcat to avoid threads error in tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 19/06/2007, at 4:45 PM, Prashant Thakkar wrote: Hi, Thanks, But this is the clients application which we are running. We dont have the access to the servlet code. That was the the obvious reason we had increased the thread limit to 250. Is the server running a lot of traffic? Then you may want to increase this even further. Is the CPU load of the server at 100%? If so, the clients software probably has an infinite loop - and no amount of config 'tuning' will fix this. Other thing i would like to know is about the thread pooling. How can i use this with tomcat 5.0.28 What do you mean exactly by thread pooling? Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFGd+3OW126qUNSzvURAnt7AJ9ciXedLgRkgMSiEELTcfalAaPFOwCfR81w /N4rNbJfMiZ1FKJLIGILbxI= =6+1V -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: Windows or Linux as Tomcat server?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Linux with a 2.6 kernel should perform better. I would be a little worried placing a Windows Server at a service provider without some sort of firewall/ packet filter protecting from the big bad Internet. But as you are asking this question, you are probably more at home with Windows, and as such are less likely to make mistakes on that platform. Cheers Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFGdndPW126qUNSzvURAt6uAJ0ZP3A1LaxEtxF8KPERVf8xFGTvHACeLRJ1 HGj2EeQQYXXq3O1p1qrsIPk= =NFJn -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: Problem with JVM, and Tomcat tuning
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 15/06/2007, at 4:36 PM, Peter Crowther wrote: From: Hassan Schroeder [mailto:[EMAIL PROTECTED] On 6/15/07, Jacob Bunk Nielsen [EMAIL PROTECTED] wrote: I experience random crashes of the JVM on a daily basis. It simply fails with segmentation faults, double frees and similar. Are any of you experiencing similar problems? I had the same problems with Java5 and Tomcat 5.5, but less often. I've had no such problems with either of the combinations you mention on SuSE10/2.6.13-15-default or RHES3/2.4.21-9.EL. ... Jacob, are you *absolutely* sure the hardware is solid? Does anything else ever crash? Does the same setup work on another machine (I appreciate this is not always easy to test)? I have to agree with Peter. This definitely sounds like a hardware problem. 'Random' errors sound very much like faulty RAM. As you were also having this problem before, it is obviously not a Java 6 problem. What messages are you getting 'EXACTLY'? You may also want to look in /var/log/messages and dmesg and see if you are seeing any strange messages in there... Cheers Andrew PS: The server isn't a SuperMicro server is it? (or rebadged like Transtec) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFGcqZCW126qUNSzvURAsdTAJ9Mh3TQo8WuX+1+cs1LpYC1bxGQHwCfYTUR +iw9g74h0B8SrSJEvRqmI5c= =Hxyk -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]
[OT] Re: Java on Multi/Dual Core
On 23/05/2007, at 11:08 AM, Kurt Spescha wrote: I apologize for this question, maybe the wrong place to put it to. But someone who is using Tomcat soon or later will be confronted with the performance problem with java and multi/dual core machines. Multi/dual core is trendy, customers want to have it. But Java runs slower on these machine, what will make them angry. If you have a single threaded application, some of the old single core machines may be quicker than a new multi-core machine. You must have a pretty strange version of tomcat to run 'single' threaded... Compiling is a different matter, as it seems Sun's JVM (1.4, 1.5) only uses one core - JRocket is quicker there... Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: is tomcat a competitor of ruby on rails? Or why did davidson praise it so highly - can you compare them?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ruby on Rails is a framework. If you do things the way Rails expects you to do things, its quite nice for doing frontends to databases. Just don't expect a performance wonder. No, you don't need to switch, but its definitely another tool worth looking at, even if the product isn't as good as the hype. Cheers Andrew On 02/04/2007, at 4:18 PM, Anil Philip wrote: Is it so great? As a long time Java programmer, I wonder. (Dont tell me we need to switch!). -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFGERMXW126qUNSzvURAl9BAJ9+iluZLMhQdM48tT6md639pijKAACeORs3 kZnaBQ+corwFvSvHPCGdP04= =G+sQ -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: Tomcat 5.5 and secure=true
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear Filip, Thanks for the info! This was what I was planning on doing with Tomcat 5.5. I have now gone back to use mod_proxy_ajp. (I can not migrate to Tomcat 6.0 for political reasons)... Regards Andrew On 29/03/2007, at 9:54 PM, Filip Hanik - Dev Lists wrote: With tomcat 6, you could do this: 1. For non SSL traffic Just ProxyPass to tomcat like always (set ProxyPreserveHost On) Connector protocol=org.apache.coyote.http11.Http11NioProtocol port=8080 proxyPort=80 2. For SSL traffic Proxy pass to another connector setup like this Connector protocol=org.apache.coyote.http11.Http11NioProtocol secure=true scheme=https SSLEnabled=false port=8081 proxyPort=443 SSLEnabled=false, means it is http, not https, but request.getScheme - will return https request.isSecure - will return true request.getServerPort - will return 443 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFGDP49W126qUNSzvURAogwAJ4vXzAmgsitlChwJGdkRv5FrZknEQCeK0S+ GLECaDbMWsDKc8xgFL5GmHQ= =trjH -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]
Tomcat 5.5 and secure=true
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear List, After reading all the comments regarding mod_proxy_ajp, I am currently looking at migrating to mod_proxy_http. The application uses isSecure to check whether the request is an HTTPS connection or not. Therefore, I have created 2 virtual servers in Apache HTTPD and created proxy entries from port 80 - port 8080, and from 443 - port 8081. What I do not understand however is why does setting secure to true, require the presence of a keystore? See below Thanks Andrew Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Connector port=8081 maxHttpHeaderSize=8192 secure=true maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Mar 29, 2007 4:18:56 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Mar 29, 2007 4:18:56 PM org.apache.coyote.http11.Http11BaseProtocol init SEVERE: Error initializing endpoint java.io.FileNotFoundException: /home/tomcat/.keystore (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore (JSSESocketFactory.java:279) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore (JSSESocketFactory.java:222) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers (JSSE14SocketFactory.java:141) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init (JSSE14SocketFactory.java:109) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket (JSSESocketFactory.java:88) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint (PoolTcpEndpoint.java:292) at org.apache.coyote.http11.Http11BaseProtocol.init (Http11BaseProtocol.java:138) at org.apache.catalina.connector.Connector.initialize (Connector.java:1016) at org.apache.catalina.core.StandardService.initialize (StandardService.java:580) at org.apache.catalina.core.StandardServer.initialize (StandardServer.java:791) at org.apache.catalina.startup.Catalina.load(Catalina.java:503) at org.apache.catalina.startup.Catalina.load(Catalina.java:523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java: 266) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java: 431) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFGC8xTW126qUNSzvURAkUlAKCNQUiK337W8rYgOvvRN0Yjq56s5gCaArYa TiJ2D/rimimeGMuPB3hjQ10= =eG6k -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: Tomcat + Cisco CSS Load-balancer configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Why not just use source IP address based persistence? The CSS11501 is not very fast, and it will have a lot of work ripping apart the layer 7 parts of the http requests. If you do not have a lot of traffic, source based persistence should be adequate for your needs Cheers Andrew On 20/03/2007, at 2:42 PM, Rigo, Jeff wrote: I am working with a customer to setup load-balancing in a tomcat environment by way of Cisco CSS11501 load-balancing hardware. We are attempting to use the 'advance-balance cookieurl' method of Cisco load-balancing. This will check for a cookie in order to manage session stickiness, but if a user is blocking cookies then it will search the URL for the session information. The cookie-based load-balancing is working as expected, but when a user is blocking cookies the stickiness fails, and the user is subject to round-robin server assignment. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF/+xDW126qUNSzvURAocsAJ9enH3gBwguIdDeq9c3FRzmtNs+XwCeIDfz dEHr56sxB9Y8vmuCYH9dNkc= =Lh9a -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: Custom error page on Tomcat 6
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/03/2007, at 5:28 PM, Hoa Doan wrote: How do I set up a custom error page in Tomcat 6? Hoa, Stupid question... Have you tried entering Custom error page on Tomcat into Google? Grrr Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFGAA5vW126qUNSzvURAg4yAJ9pjgGLBPsUIT9MwACfD2gLuZdaYwCeJLqD 56it2Ldc49uvneo3j9MuBEY= =ZEe0 -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: [OT]Re: Is better one or more Tomcat instances per machine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/03/2007, at 2:31 PM, Christopher Schultz wrote: The reading I've done so far on this subject leads me to believe that most people don't know what they heck they're talking about. Some claim that 32-bit OSs can't use more than 4GB RAM (they can) or that they have 32bit OSes can not use more than 4GB RAM. What you are probably referring to is PAE, and there the kernel splits the 'extra' memory into chunks, and can give each process part of this chunk - a single process however, under linux can not use more than 2GB (or 3GB) of RAM (depending on how the kernel was compiled) 2GB/2GB kernel and process memory boundaries (they don't, except that I think MS Windows might have this), or that the problem is that 32-bit Well think again http://support.microsoft.com/kb/283037 It will tell you all about the 2G/ 3G issues as well. So, can you point me to a resource that actually explains what the problem is and why it exists? The above link should hopefully be enough. Cheers Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF+APdW126qUNSzvURAqUtAJ0eNCOTgjU+/s0eZ+lGpcq2nNyu1wCfZj4u 7UAUSZz4U9SjvFHYAMMBp0w= =KRln -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: [OT]Re: Is better one or more Tomcat instances per machine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/03/2007, at 3:11 PM, David Delbecq wrote: This has changed. An new architecture was brought in CPU (at pentium II time?) that allowed OS to do a 4G/4G mapping in 32 bits mode. Since you don't access kernel space from user mode directly, you can simply use different pointer for kernel space and user space. Hardware wiring allows to map to different addresses. At application level, it does not change anything, you still do a malloc and use resulting pointer. At kernel level, changes have been made when datas are transfered from kernel space to user space. However, for this 4G/4G split to work, you will need a 2.6 kernel i think. So, 4G is the maximum memory any application can allocate in 32 bits modes, be it at one time or in several operations. Ummm - 4G/4G can't work - I think what you are referring to is PAE, and this does what effectively was earlier called bank switching - oh those memorys of TRS80s and Commodore 64s! (Oh and this works with 2.4) Cheers Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF+AS1W126qUNSzvURAsx/AJ0bOtkSMX32G4Iu6Mfa/2i6F2UxGgCdEvPi 9sN8iQ0+WYNuYWAhv+ue4es= =nKSG -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: Is better one or more Tomcat instances per machine
On 14/03/2007, at 3:17 PM, Peter Crowther wrote: From: Leon Rosenberg [mailto:[EMAIL PROTECTED] There is no real advantage in multi-instancing. A minor advantage is that if you allocate one webapp per container, if one webapp fails it only takes down its own container. Well-coded webapps should never cause this - and, of course, we all manage completely bug-free webapps all the time, don't we? :-) Actually, according to the JSP spec, one Webapp is not allowed to effect the other, so if you use Tomcat, one Webapp can not take out the other... :-) Duck and run for cover Cheers Andrew - 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: [OT]Re: Is better one or more Tomcat instances per machine
On 14/03/2007, at 3:21 PM, Peter Crowther wrote: Let's be clear about the distinction between OS and process managed by OS: - The OS as a whole can manage 4 Gbytes of physical memory using PAE; - On some OSs (Linux, perhaps?), a user process cannot be allocated 4 Gbytes of RAM; Sorry, was being lazy, yes a 32bit OS can via PAE address more than 4GB of memory SPACE. On linux, and other *nixes running on IA32 hardware, you will find that you have User and Kernel Space. The user space is the amount of RAM you as a process can allocate for this single process. It is usually a 2G/2G split, although you will sometimes find 3/1 or 1/3. This is because there needs to be some way for your process to interact with the hardware and kernel. - On other OSs (Windows), a user process *can* be allocated 4 Gbytes of RAM. Microsoft SQL Server (2000 Enterprise and up) use the facilities built into Windows 2000 and up to allocate PAE memory to the sinle SQL Server process. Hey cool, looks as if Microsoft has implemented bank switching for user space, although still rather primitive. (AWE) Here a few links http://support.microsoft.com/kb/274750 http://msdn2.microsoft.com/en-us/library/ms190673.aspx You learn something new every day! Cheers Andrew - 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: [OT]Re: Is better one or more Tomcat instances per machine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/03/2007, at 3:52 PM, Caldarale, Charles R wrote: The user space is the amount of RAM you as a process can allocate for this single process. No - RAM has nothing to do with the split. Process memory is the amount of virtual space allocated to the user; the OS may choose to use much less RAM behind that virtual space. Page thrashing may occur, but the process still gets to play with what it thinks is 2GB of memory. Arrgh! Ok - RAM was the wrong word. This is because there needs to be some way for your process to interact with the hardware and kernel. The global and local descriptor tables and the page directories/tables provide the translation between virtual space and RAM. There need not be any split between user space and kernel space, but it's useually more efficient to create such a boundary. Your kernel, and the things which are doing your process switching need somewhere to run - if you switch them out of your 4GB of virtual address space, how are they ever meant to 'come back to life' on the next context switch. As for it 'NEEDING' to be 3/1 or 2/2 - agreed - but some amount does need to be there. (This is all of course assuming you are running some sort of preemptive operating system) Didn't the reason for choosing this size have something to do with the memory required by the PCI slots, etc? Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF+BA+W126qUNSzvURAhAlAJ4qrZ1PEiQ3wnNwRBsY8lOfbaBbFACgieQD uLK9GNTvsS7zbo1weFpM9jk= =4UIv -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: Chrooting Tomcat // Linux threading issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13/03/2007, at 11:22 AM, Roman Medina-Heigl Hernandez wrote: Hello, Server version: Apache Tomcat/5.5.17 Server number: 5.5.17.0 OS Version: 2.4.34-grsec-rslabs-k7 JVM Version:1.4.2_10-b03 PS: A 2nd issue (not related to chroot) that I would like to clarify, if you're so kind: when I run the web app in Tomcat (version showed above) I got several processes (69 in particular). It seems to be related to the following FAQ: Actually, you get 69 'threads'. Linux 2.4 kernel shows (and deals with) threads as processes. http://tomcat.apache.org/faq/unix.html#ps But I've read FAQ entry (and followed the two links in the entry) and it is unclear to me where there is some workaround in latest 2.4 kernels (I'm using 2.4.34; don't wanna switch to 2.6 yet). The FAQ talks about lightweight processes (the threads, as seen by Linux 2.4), but how could I check that they're really light? I'm trying to measure the possible impact of linux threading problem over my application. Some URLs or help would be welcomed. I've also set LD_ASSUME_KERNEL=2.4 and exported the variable, without any apparent change of behaviour. Look for NPTL and Linux in Google... for example: http://kerneltrap.org/node/429 I would seriously recommend upgrading to a 2.6 kernel - (unless performance for your web app is irrelevant) It would also be time to think about an upgrade to Java 1.5 or 1.6. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF9n8yW126qUNSzvURAkcMAJ93juvogDO9QxMAOW19R+I/cjDfcACfT3gl w9MjlRfL7zzzByl77Y7xu08= =pe3y -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: Chrooting Tomcat // Linux threading issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Roman, To be honest I don't really understand your concerns with 2.6, but if you really want to be running anything that uses threads, use a 2.6 kernel. If the Java Tomcat App that you are running is just a frontend to something else, and not really for production purposes, then you can happily stick with 2.4 And yes - 2.6 with NPTL is MUCH faster under high load than using an old 2.4 kernel. In my experience Java 1.5 is also much quicker than Java 1.42 On 13/03/2007, at 3:48 PM, Roman Medina-Heigl Hernandez wrote: Hi Chuck, Not too much relevant != isn't relevant. Performance is always relevant, so it's good to enhance it *if possible*. I mean, if switching to 2.6 could make security worse (I know, this assert could be subjective / questionable but it's one opinion) AND performance is not too much relevant, I will not switch to 2.6. I don't know the enhancements of different JVM branchs/versions, nor from a performance perspective, neither from a security perspective, so a JVM upgrade could be perfectly possible and coherent with my thoughts. I hope your curiosity is satisfied :-) Cheers, -r Caldarale, Charles R escribió: From: Roman Medina-Heigl Hernandez [mailto:[EMAIL PROTECTED] Subject: Re: Chrooting Tomcat // Linux threading issue Performance, in this case, is not too much relevant. Would I notice big performance improvements if upgrading? I'm curious: if performance isn't relevant, why do you care if a JVM upgrade would make it better? - 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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF9ruYW126qUNSzvURAuR/AJ9VMX4gL161TxBXaDYEPXNKNJdq5QCffZgJ gJOVSu4uVlJ4shlP0yZFH7I= =KZVm -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: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This will work if you are only using 1 Apache HTTPD server Regards Andrew On 07/03/2007, at 11:27 AM, Sriram Narayanan wrote: I'd posted sometime ago seeking help for a particular requirement. Rainer Jung replied to my post. The thread is here http://thread.gmane.org/gmane.comp.jakarta.tomcat.user/144823 Requirement: 1. Host an application on two tomcat instances. 2. Enable load balancing between these two Tomcat instances. 3. If one Tomcat instance goes down then the other should take over. 4. If the second goes down, then the first should be retried. This should happen even if the first had failed some time ago. 5. After both the Tomcat instances are retried a number of times, fall back to yet another Tomcat. This third tomcat could do some special processing. Solution: mod_jk gives us this out of the box. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF7pTSW126qUNSzvURAjE7AJ4z/2hNk4QqdFirX0liLH0YBDJWVwCfZRwh bY/ufculwvdURDGYguWx+Gw= =euml -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: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/2007, at 12:58 PM, Sriram Narayanan wrote: On 3/7/07, Andrew Miehs [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This will work if you are only using 1 Apache HTTPD server Are you referring to the following ? Two httpd servers with mod_jk pointing to the same two tomcat instances. httpdA and mod_jkA have a reference to TomcatA and TomcatB httpdB and mod_jkB have a reference to TomcatA and TomcatB What would be the complications in such a scenario ? I can think of situation where mod_jkA does not know of mod_jkB's status and vice-versa. Yep - this is the case I am referring to. You have moved the problem of load balancing Tomcat to load balancing HTTPD. How do you want to load balance httpd? Don't forget, you will need something to deal with session persistence. If the Apache HTTPD and tomcat are running on the same machine, you will probably find it easier to do a 1-1 mapping httpd - tomcat than the cross over setup that you are currently envisaging. Regards Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF7rWrW126qUNSzvURAu8qAJ9a1lR//+cKOr9xYa5q4byFn2IltQCcCU5Q esRNcj1ucsQNwA3K+XLjrGE= =4Tlr -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: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Christopher, Balancing the 2 Tomcats behind one Apache (with sticky sessions) works. Now you add a second Apache HTTPD. How do you choose which one of these gets used? You now have the original problem all over again... How do you load between the two web servers? Cheers Andrew On 07/03/2007, at 4:24 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Miehs wrote: This will work if you are only using 1 Apache HTTPD server Really? It looks like it would work to me. Sure, the separate mod_jks don't know each other's status, but it doesn't matter as they will quickly find out the status of each Tomcat instance pretty quickly. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF7u9CW126qUNSzvURAh5+AKCEcI3uKAisPAKhRUuTEMXSHSWzqACffxxx 5YZuzPz+e44Lq4EI3EV+SX8= =du2M -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: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 :-) We just had this discussion last week on the Debian ISP mailing list. Round Robin DNS is a nasty fix to this problem, and isn't guaranteed to work correctly. Either a real load balancer (like a BigIP) or some form of Linux HA are the only real ways of dealing with this. Cheers Andrew On 07/03/2007, at 6:26 PM, Christopher Schultz wrote: Andrew Miehs wrote: Balancing the 2 Tomcats behind one Apache (with sticky sessions) works. Now you add a second Apache HTTPD. How do you choose which one of these gets used? You now have the original problem all over again... How do you load between the two web servers? Perhaps round-robin DNS? That's how I would do it, unless I wanted to buy a real load balancer like a BigIP. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF70R+W126qUNSzvURAvenAJ9Z53iM+L5wzca7TbMx86hyuFzXnQCfQJSy kzvxgXrEVlzWcgJyuJA2uAo= =2cYH -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: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/2007, at 7:47 PM, Leon Rosenberg wrote: On 3/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: Perhaps round-robin DNS? That's how I would do it, unless I wanted to buy a real load balancer like a BigIP. Ok, round-robin dns will work. But it will probably work with pure tomcats too, wouldn't it? If you round-robin the load between two httpds, why dont you do the same between two tomcats? You may want to have a look at this http://homepages.tesco.net/J.deBoynePollard/FGA/dns-round-robin-is- useless.html and http://en.wikipedia.org/wiki/Round_robin_DNS Some desktop clients may even try alternate addresses after a connection time out of 30-45 seconds. This behavior is unfortunately not specified - and could be changed at any time. I don't know if I would want to define my failover via a not specified mechanism. Regards Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF70WDW126qUNSzvURAvDQAJ9nPySRDp3cDs9BSqHb+A3t6dAEmgCePuTu 025lDxVLvPXpX/GYbSC22Gg= =0FVL -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: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/03/2007, at 1:28 AM, Christopher Schultz wrote: Either a real load balancer (like a BigIP) or some form of Linux HA are the only real ways of dealing with this. I totally agree. A single BigIP is a single point of failure, though. R-R DNS with multiple BigIPs is better than single IP - single BigIP, no? IMHO, not really. If you need two devices load balancers to deal with your current load, then you already have a problem. We run our BigIPs Active/Standby - and when the one BigIP dies, the other takes over the 'VIPs' - virtual ips - from the other box. The one IP address points to a floating address which is shared by the load balancer. HA solutions work the same way, moving a floating addresses between the multiple boxes... Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF747wW126qUNSzvURAoSqAJ9O+TKKJ85J2GtU1PW2T6HpYI/dpwCdGciA HAZLfdqboHY8aCI+EwEVdqY= =/Abo -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: 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: Performance tuning parameters
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear J, The focus should be on your application, and configuring everything thing around that. If you REALLY have an out of connection problem, increase Max Threads to 1, but I don't think that will really help you. The problem is usually that each individual request takes tooo long, which again, points back to your application - There isn't that much to tweak in tomcat. Once you have configured your application, then you can start looking at the kernel - but these only bring small % improvements. Without more information - ie: current number of threads being used, it is very hard to answer your question. Cheers Andrew On 16/02/2007, at 4:43 AM, j r wrote: The focus should be on the tomcat tweaking. We get errors in the tomcat error logs that say tomcat has reached its connection limits. I never said that it was serving slow. It hits connection limits which means that the app will not serve any more traffic until connections clear. If a box definitely has more capacity (dual core, dual procs), then my best guess is that tomcat is not tuned perfectly to allow the max amount of connections in. We have raised MaxThreads in the past to allow more connections in. This works, but surely other knobs are important to be tweaked. I am looking for good definitions and/or best practices on which knobs to tweak to allow the max connections in before exhausting the jvm native memory allocation or cpu on the box. Thanks, J On 2/15/07, Andrew Miehs [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear J' What do you mean you are hitting connection limits?! Are you getting errors? What are you seeing that makes you think that is slow? Is there a database involved in this application? I assume you are running linux on your server, with a 2.6 kernel. run the following commands while your box 1) ps auxH 2) ps auxH |grep -c java 3) vmstat 5 5 4) iostat 5 3 Then we will have a bit of an idea what is going on. Andrew On 15/02/2007, at 9:36 PM, j r wrote: The reason it is hitting its limits is easy: traffic. We easily get enough website traffic to overflow the connection limits unless I have many boxes available to serve. I know these can be configured to handle more connections. I know that we should be able to do this in the tomcat server. That is why I need those tweaking parameters defined. Thanks, j On 2/15/07, Leon Rosenberg [EMAIL PROTECTED] wrote: First you should investigate why tomcat is hitting its limits. Why do you think it does? Which resource is the limit? Do you have/use any monitoring software? moskito? lambdaprobe? tomcat-manager? regards Leon On 2/15/07, j r [EMAIL PROTECTED] wrote: I have searched for exact documentation on this, and I always find conflicting info. Therefore I am reaching out to this list. I have the following info and questions: - we are running tomcat 5.5.20 - we have the following configs in server.xml: Connector port=8009 enableLookups=false redirectPort=8443 debug=0 maxThreads=750 minSpareThreads=100 maxSpareThreads=250 acceptCount=100 connectionTimeout=5000 tomcatAuthentication= false - we have extra capacity (mem, cpu, etc.) on the servers, yet tomcat is hitting connection limits - we feel that tomcat can serve more, so what do we tune to make it do so? - maxThreads? - minSpareThreads? - maxSpareThreads? - acceptCount? Honestly, I would rather love an exact definition of what each of those would do to the tomcat server if tweaked. Knowing that would be nirvana for tuning. -j - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF1NaFW126qUNSzvURAuxZAJ4ugkLObXKHJZsSIfX3SWzZzv5vlQCdHXeV jSPVOQqZXoxvlQc7Q94vMlA= =YSSz -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] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF1XNhW126qUNSzvURAtjIAJsHhDX6gXQFPi9UFnFgCPHqB0yGCgCeM7mg e41/HBE3bGRaol1JAJh81ds= =5ZBO -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: Performance tuning parameters
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear J' What do you mean you are hitting connection limits?! Are you getting errors? What are you seeing that makes you think that is slow? Is there a database involved in this application? I assume you are running linux on your server, with a 2.6 kernel. run the following commands while your box 1) ps auxH 2) ps auxH |grep -c java 3) vmstat 5 5 4) iostat 5 3 Then we will have a bit of an idea what is going on. Andrew On 15/02/2007, at 9:36 PM, j r wrote: The reason it is hitting its limits is easy: traffic. We easily get enough website traffic to overflow the connection limits unless I have many boxes available to serve. I know these can be configured to handle more connections. I know that we should be able to do this in the tomcat server. That is why I need those tweaking parameters defined. Thanks, j On 2/15/07, Leon Rosenberg [EMAIL PROTECTED] wrote: First you should investigate why tomcat is hitting its limits. Why do you think it does? Which resource is the limit? Do you have/use any monitoring software? moskito? lambdaprobe? tomcat-manager? regards Leon On 2/15/07, j r [EMAIL PROTECTED] wrote: I have searched for exact documentation on this, and I always find conflicting info. Therefore I am reaching out to this list. I have the following info and questions: - we are running tomcat 5.5.20 - we have the following configs in server.xml: Connector port=8009 enableLookups=false redirectPort=8443 debug=0 maxThreads=750 minSpareThreads=100 maxSpareThreads=250 acceptCount=100 connectionTimeout=5000 tomcatAuthentication= false - we have extra capacity (mem, cpu, etc.) on the servers, yet tomcat is hitting connection limits - we feel that tomcat can serve more, so what do we tune to make it do so? - maxThreads? - minSpareThreads? - maxSpareThreads? - acceptCount? Honestly, I would rather love an exact definition of what each of those would do to the tomcat server if tweaked. Knowing that would be nirvana for tuning. -j - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF1NaFW126qUNSzvURAuxZAJ4ugkLObXKHJZsSIfX3SWzZzv5vlQCdHXeV jSPVOQqZXoxvlQc7Q94vMlA= =YSSz -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: Command line reloading of a webapp?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 curl http://localhost:8080/manager/reload?path=/examples ? Andrew On 17/01/2007, at 11:01 PM, Boemio, Neil (FGIC) wrote: I know I can reload a webapp using: http://localhost:8080/manager/reload?path=/examples But is there a way to do this from a command line so that I can schedule it without using the browser ? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFrqYbW126qUNSzvURAj/MAJkB5+BJCf5dqTa1KyiAoqz97rfGwwCfZbCz azeZyqv0kDirUeRui2fJVgw= =0559 -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: Securing Tomcat Article for Review
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/01/2007, at 11:50 AM, Mikolaj Rydzewski wrote: Leon Rosenberg wrote: Sure, I could write my own filters and pass the static content through them first, but that'd slow down the whole app (tested). Could you explain this a little more? How can it be that if you write out something from memory it's slower than ask the filesystem which could eventually have it in cache and be comparable fast in _best_ case? Ever heard about sendfile()? http://builder.com.com/5100-6372-1044112.html http://www.freebsd.org/cgi/man.cgi?query=sendfilesektion=2 sendfile is only interesting if you are delivering static content. If 90% of your content is dynamic/ being created by tomcat you will end up with a significant performance decrease if you stream every request through Apache. What I ended up doing on a customer site to separate images from content is using .domain.com from dynamic content and image.domain.com for static content. Cheers Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFpRw2W126qUNSzvURAumeAJ9hru9xSbfeM4MttBRaSIuTwmo0TgCgjMg2 hakZka0QpvLjaVv3JAEKHQc= =MxXj -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: Securing Tomcat Article for Review
On 09/01/2007, at 5:20 PM, Christopher Schultz wrote: Leon Rosenberg wrote: Also by using apache in front of tomcat you rather loose[sic] security than gain it. At least this is my personal opinion :-) Would you care to defend that argument? Security in layers is typically an advantage. One could argue that more moving parts equals more complexity, and that complexity is an enemy of security (and I agree). However, there must be a balance. If good security requires layers, and each layer adds more complexity, then there is a paradox. With Apache HTTPD you have the advantage of being able to do fine grained url/ IP access control. It also brings with it however all the bugs that are in Apache HTTPD. What are your trying to protect by adding in Apache HTTPD? The IP Stack ? - Nope kernel issue - have this problem with both... Tomcats connection handling ? Nope - not protected as mod_proxy and mod_jk blindly forward all traffic towards the backend tomcat. So unless you want protect certain paths, hiding tomcat behind an apache will not bring any security benefits. Regards Andrew - 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: web application - student need help
| | i remember when websites like friendster.com came out, it was really | slow. | | now it is much faster, do you guys know where does a student learn | | about how to handle high traffic web applications? is there any | | classes? http://www.kegel.com/c10k.html is a good place to start Andrew - 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: Basic Auth without modification to web.xml?
Hi Andreas, Why not just pack an Apache Httpd out front, and use access rules? Regards, Andrew On 23/12/2006, at 1:22 PM, Andreas Schildbach wrote: Hi everyone, Is it possible with Tomcat to hide an application behind a Basic Authentication (or something similar), without modifying the web application itself (also not modifying web.xml)? I am thinking about adding a Valve or something to the context.xml. The content to be protected would just be the whole application, and there is only one user/role needed that has access. Is there something like this possible? - 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: tomcat w/o commercial crap
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is this a troll? You will need some copy of Java to use Tomcat - either the JVM from Sun, IBM or Blackdown (which I think is based on Sun's) As for ?! commercial = crap ?! Glad to see you are using a free non- commercial machine to write these mails... Regards Andrew PS: Enrico - Looks like you have someone playing with your mailer - maybe you should fix this first. X-Terror: bin laden, kill bush, Briefbombe, Massenvernichtung, KZ, X-Nazi: Weisse Rasse, Hitlers Wiederauferstehung, 42, X-Antichrist: weg mit schaeuble, ausrotten, heiliger krieg, al quaida, X-Killer: 23, endloesung, Weltuntergang, X-Doof: wer das liest ist doof On 05/12/2006, at 5:10 PM, Enrico Weigelt wrote: Hi folks, is there any chance to get tomcat working w/o sun's commercial crap ? I'm working on gentoo and can't tomcat it w/o going to the sun shop :(( -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFdZ5FW126qUNSzvURArTFAJ47M3+qrdJumvCKIgrflYekzsv8RgCZAd5F KMbbgGu7Np+I/L7IjK4vhBg= =GiiB -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: tomcat w/o commercial crap
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Do yourself a favour and do NOT use Tomcat and Java from your linux distribution. Download Tomcat from Apache.org Download Java from http://java.sun.com/javase/downloads/index.jsp Either the JDK, or JRE Install them both in /usr/local ln -s /usr/local/java-whatever-their-version /usr/local/java change your startup script to JAVA_HOME=/usr/local/java export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH Cheers Andrew On 05/12/2006, at 5:48 PM, Enrico Weigelt wrote: * Nelson, Tracy [EMAIL PROTECTED] wrote: Not sure what you mean by 'commercial crap', Java is OSS now, and Tomcat always has been. maybe I missed something, but tomcat requires several packages, ie. sun-jimi, which are NOT free (and cannot be downloaded directly). -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFdaThW126qUNSzvURAmcXAKCQW0QNyqRXrLhIRMakpzihiMU4AQCgkfun Ntsf8grmyPW1HoTAep2be6M= =/4xB -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: tomcat w/o commercial crap
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This however is a Gentoo packaging problem and not a user problem. If you want to get tomcat working as quickly as possible - download it directly from apache.org and IGNORE the gentoo packages. If you want it to work properly as a gentoo package either contact the package admin/ Gentoo user mailing list, or fix it yourself. My recommendation: Do not install Java or Tomcat from distributions, always install them yourself - A) Its easier B) It works with no nasty side effects Andrew On 05/12/2006, at 7:19 PM, Enrico Weigelt wrote: * Owen Cumpson [EMAIL PROTECTED] wrote: I'll jump in here, I use Gentoo ~x86 (a bit racy, but hey) and Tomcat 5.5.20 installs without any non-free dependencies (that I could see). Looking in the Gentoo forums, a new ebuild for Tomcat had been released on 1st December to overcome a similar issue (maybe even the same as yours). Look in: http://forums.gentoo.org/viewtopic-t-518653-highlight-tomcat.html That doesn't solve the whole problem. There're still some other unfree packages required, ie. sun-jimi and sun-javamail-bin :(( -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFdbt7W126qUNSzvURApKsAJwM3emtaOZsoHHvpAn7blqiWDTj9ACfSx7B M3ThOKRh2BP5w+2RpLilWgw= =P6D0 -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: Is jsp designed for use by large websites
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear List, JSP is designed to be used for Websites. Depending what you do with it, changes where it can be used for a Large Web Site. As for the questions. 1a. Who cares if JSP is not supported by web hosting companies - Large web sites have their own infrastructure. 1b. Both are programming languages - both have strengths and weaknesses - you can do the same thing with both - you could even use plain 'c' if you feel like it. Use which ever you are most comfortable with. 2. How many users a 'language' has is irrelevant. Glad to see you are quoting informative sources. :-) Architecture is the issue - not language. Andrew /grrr On 30/11/2006, at 3:11 PM, John Mok wrote: 1a. JSP is not supported by many web hosting companies or is only supported in more expensive dedicated server plans. In contrast, open source alternatives such as php is well-supported by web hosting companies. - Result: most small and medium sized websites/webapps that do not need a dedicated server use php. 1b. JSP has many great features. But php is also very powerful and has some capabilities that jsp doesn't have. - Result: some heavy-traffic websites/webapps that require dedicated servers use jsp. Some others use php (eg. yahoo [http://news.com.com/2100-1023-963937.html]). - 2. There are more php users than jsp users. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFbuqNW126qUNSzvURAmPTAJ9p2ShOSlLfLZXIbxRAzdNNEmuRJQCdG6i0 X6KSGAP8rAUERmUS7mpgVKg= =Qlh7 -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: Tomcat Out Of Memory
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Which kernel are you running? If you are running 2.4 I could imagine that it could be an out of process/ thread limit. Java used to report - out of memory - even for out of processes/ threads problems I think 2.4 had a default limit of 256 Process/ threads. ulimit -a will show you how high your process limits are set. Regards Andrew On 15/11/2006, at 11:14 AM, Santosh Puranshettiwar wrote: Gaurav Kushwaha wrote: A quick fix would be to specify minimum and maximum heap size using JVM parameters -Xms and -Xmx. -Xms specifies the minimum heap size and -Xmx is used to determine the maximum allowed heap size. So, lets say if you have enough memory to allocate 512 MB to your java process you shoud write something like: java -Xms512M -Xmx512M. Well in most cases the default heap size does good enough. In some cases we may have to increase it. But in case this too doesn't work, try profiling your code. On 11/14/06, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: Tomcat Out Of Memory We are running Tomcat 4.1.18 on RedHat ES3 using JDK 1.4.2_02. What is causing the error message below and What can I do to solve it? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFWworW126qUNSzvURAqsyAJ4hFkVoVk5fVL9Pxl6K97cRcs1yZwCfbz+N Uz3mssqyZM/75TSvVqU7Uak= =75sK -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: Thread pool per webapp?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 As a quick hack If you only want to partition between 2 webapps you could always use the nasty method of using 2 tomcats. The other alternative would be to configure a second HTTP connector, and then use one for the one webapp, and the other for the second. Andrew On 04/11/2006, at 1:31 AM, David Smith wrote: Well I was actually holding off because the internal threading of tomcat isn't my area. But if you insist, I have never seen any configuration parameters that effectively partition threads between webapps. --David -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFTHTtW126qUNSzvURAvAMAJ9pvkib8k77yvt6PR3mzPXlGZaQOACffYpm Q91JSlFMVHKoJa8KNepAq5E= =Dcd/ -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: Thread pool per webapp?
Why not, as i asked before, just start two tomcats? - not pretty but it works... ie: Tomcat1 (webapp1) - Port 8080 Tomcat2 (webapp2) - Port 8081 - Then setup tomcat1 with 70 threads, and tomcat2 with 30 threads Cheers Andrew On 04/11/2006, at 9:56 PM, David Smith wrote: Quoting the original question: Let's say I have webapps A and B, and A is more critical webapp. Let's say my connector's pool size is 100, and there are 100 concurrent requests destined for A and B each (so total 200 requests here). I would like to allocate 70 threads to process A's requests, and only 30 for B's. Allocating a portion of the total number of threads to a specific webapp is partitioning the thread pool. Think of it as analogous to partitioning a drive. The term seemed to fit very well when I wrote the message. --David - 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: Multiple paths to one application
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Doesn't this only work if your application replaces the 'ROOT' application? Andrew On 02/11/2006, at 9:56 AM, Stephan Schöffel wrote: if you map them to one app in your web.xml you can have different paths link to one app. like: servlet servlet-nameMyServlet/servlet-name servlet-classmy.Servlet/servlet-class /servlet servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/path1/servlet1/url-pattern /servlet-mapping servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/path2/servlet2/url-pattern /servlet-mapping both links would map to MyServlet ie my.Servlet.class -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFSbbPW126qUNSzvURAn4qAKCUxRJ5gzOEVTINFsLzggswi6n1VACfc+mE GHpg8SLtzz0o5x4op7JhmNg= =4vxd -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: AW: Multiple paths to one application
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I hope that this is not really the reason why you want two paths to the application? Tomcat has user authentication built in!? Why not use it?! Otherwise, some smart user is going to have the idea of connecting directly to your tomcat instance... If you have 'two' copies of the same web app, you may also end up with other side-effects, depending on how the thing works ... Two copies using the same database, when they each believe that they are the only one connected! :-) Andrew On 02/11/2006, at 4:01 PM, Peter Neu wrote: This means when I configure it like this it makes no difference to just deploying the same application twice with different paths, right? My problem is that I have parts of my application which are restricted and I just want to filter the path requests with the httpd server which sits in front of tomcat so that I don't to configure any additional realms. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFSgoCW126qUNSzvURAn0uAJ9M8hRTpOCxPE+z7NOhho8tdVA39wCcDWpn Cfj3u/04QUinjCoTLAYc6FU= =jcI6 -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: Max Memory Reading
Nope - the 32Bit JVM can only deal with about 1.5GB Ram Andrew On 13/10/2006, at 2:51 PM, Alan Flisch wrote: I thought you were safe up to 4000m (in practice a little lower) for the 32 bit VM. Regards, Alan - 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: threads, performance, and exceptions
You may want to try turning off keepalives in your tomcat. (I assume you are only using tomcat, and not proxying through mod_jk and apache/ IIS). In your connector settings have a look at 'maxKeepAliveRequests=1' If you really have that many threads, you will probably be best of using Linux, with a 2.6 Kernel due to the way Linux deals with threads. Regards Andrew On 02/10/2006, at 5:16 AM, Peter Warren wrote: My question is: how can I best improve the performance? Is the server really refusing client connections or is the load test bogging down and reporting spurious messages (the load test uses many threads as well)? Is the high # of threads on the server a problem? Would running on Linux or another OS help? Is there a way for me to minimize the # of servlet threads required? - 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: System requirements
Hi Nicolas, Tomcat works best with large hardware. I have found that using a Sun Enterprise 15K with 1 processor per online user gives me the best performance. Regards Andrew PS: Maybe you should give us slightly more detailed information about your requirements if you want someone to be able to help you On 19/09/2006, at 2:26 PM, DEMESY Nicolas wrote: Hi, I would like to know what are the system requirements for using Tomcat in a production server, with 50-100 users, on a Red Hat Advanced Server 3. Where can I find benchmarks ? Thank you for your advices, Nicolas DEMESY - 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: moving to linux
Hi Rodrigo, How long is a piece of string? The 'Brand' of linux only really makes a difference for administration purposes. Performance will be about the same on all, depending mainly on which version of the kernel you are running. Should you decide to go Linux, I would look at something with a kernel 2.6.12... As for how many users - this really depends on how your app works, and what hardware you have running in the background. Are the tomcats even the problem? or is it the database in the backend? You will find the new threading library in Linux 2.6 to be very beneficial for tomcat with lots of threads. Andrew On 11/09/2006, at 10:37 PM, Asensio, Rodrigo wrote: CentOS Debian with tomcat, how many users are you handling ? Here with 350 logged users our Win2003-Serv is suffering a lot all the time. I really want to know the capacity of tomcat handling lot of sessions concurrently. Thanks. R -- - 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: Low performance with Tomcat APR
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Which kernel are you using? 2.6 or 2.4? Andrew On 05/09/2006, at 3:34 PM, José Manuel Molina Pascual wrote: Hello, I just installed Tomcat APR on a SUSE 9 and found that the performance has fallen dramatically (I fact, performance with APR it's half than without it). I followed the instructions of the Tomcat Documentation. I suppose that this must be some configuration issue. I'm using Apache APR 1.2.7, OpenSSL 0.9.7d and Tomcat 5.5.17. Thanks in advance. -- Peace Sells.. But Who's Buying? When all you have is a hammer, everything looks like a nail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFE/X/UW126qUNSzvURApeeAKCLsZGjOsxZGMqXVnIf8OEHrdUlkwCcCoxe N8wWBqgIRWfizB0ttVxkKl0= =/g93 -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: max memory..
I discovered no difference in performance between running 1 tomcat, or 4 tomcats on the one machine - same performance. The machine was a 4x Opteron 870 with 8GB RAM, running Java 1.5.6 32bit. Andrew Boris Unckel wrote: Hello, can I move to 2048mb without any problem ? Leon Rosenberg wrote: are you using a 64bit version? If yes than the answer is yes. Otherwise its probably no :-) Is this really just a 32 vs 64bit decision? What about garbage collection cycles? What about more than one instance of tomcat for the same application on the same machine (scaling somehow vertically)? Regards Boris - 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: Tool for monitoring Tomcat from the client side
Why do you need c? Works with perl and shell scripts... You could even use java if you wanted Andrew On 30/08/2006, at 10:36 AM, Bruno M Luque wrote: I would use Nagios, its worth the effort of dealing with C, you dont have that meny choices!, cheers - 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: Tool for monitoring Tomcat from the client side
From http://tomcat.apache.org/tomcat-5.5-doc/apr.html When APR is enabled, the HTTP connector will use sendfile for hadling large static files (all such files will be sent ansychronously using high performance kernel level calls), and will use a socket poller for keepalive, increasing scalability of the server. On Linux, epoll is used if available. Regards Andrew Caldarale, Charles R wrote: From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: Re: Tool for monitoring Tomcat from the client side This slightly besser performance, is it achieved by C or by using epoll? Good question, and I don't know the answer. It would be interesting to see if there's any performance difference by recoding the pure Java request handler in Tomcat to use NIO and its polling capability. Any volunteers? - 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: 10,000 Virtual Hosts in a Tomcat instance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What is this supposed to become? Do you want 10,000 domains on the tomcat? or do you want 10,000 webapps? The JVM will die if you do this with 10,000 webapps Andrew On 26/08/2006, at 11:36 AM, Mladen Turk wrote: KEGan wrote: Hi, I am wondering if anyone has added 10,000 virtual hosts to Tomcat before, and whether Tomcat can handle this. There are no limits except memory available to the JVM. The performance itself should depend only on the file system, and I would suggest not to put all 1 homes inside the same directory root. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFE8BevW126qUNSzvURAuUvAJ9imCr0QgPH9GtRWoP+Rn17cKrYgACfTmoy HaoJLfqu8Y+gtR7sU1PAPCA= =lN6F -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: 10,000 Virtual Hosts in a Tomcat instance
Ok - Theoretically it may work... Who do you know that has a machine with Terabytes of memory? And is using it for web hosting?! The JVM will spend all its time doing context switching and garbage collection... Andrew On 26/08/2006, at 11:49 AM, Mladen Turk wrote: Andrew Miehs wrote: The JVM will die if you do this with 10,000 webapps Why do you think it will die? There are systems with 64-bit JVM's and terabytes of memory. - 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: 10,000 Virtual Hosts in a Tomcat instance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If you are only delivering static content, then use Apache or Lighttpd http://www.lighttpd.net/ This is NOT what tomcat is designed for As for how much memory, no idea - but it cant be good Andrew On 26/08/2006, at 12:00 PM, KEGan wrote: Thanks Mladen for the valueable reply. Andrew, on your question : it is 10,000 domains that serves 10,000 different static HTML. One HTML for each domain. How much memory does 1 webapp takes in Tomcat ? Would it be ok with 10,000 domains pointing to 10,000 webapps but each webapp serves only static HTML? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFE8B1vW126qUNSzvURAsa7AJ0ThoV+7mOGrdOMGhHBbJPtxv75OQCfUa4Z R2X7ESQkd1h/vRuak0MdD4w= =jIyr -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: 10,000 Virtual Hosts in a Tomcat instance
Dear Mladen, Are we referring to 10,000 Virtual servers or 10,000 Connections? And the answer is yes to 1 connections. Yes I would use worker-mpm or better still an epoll based httpd daemon, like lighttpd or zeus. Regards Andrew On 26/08/2006, at 12:18 PM, Mladen Turk wrote: Andrew Miehs wrote: If you are only delivering static content, then use Apache or Lighttpd http://www.lighttpd.net/ This is NOT what tomcat is designed for In theory the threaded model should consume less memory and less CPU cycles compared with prefork model. Of course if your application is stable then you should always prefer worker-mpm over the prefork-mpm. Did you ever tried to hit the Httpd with 1 concurrent connections? I did, and Tomcat uses less memory then Apache httpd, and that's why it is 2 times faster then httpd. - 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: 10,000 Virtual Hosts in a Tomcat instance
Stupid question, Why don't you implement the 'virtual' hosts inside the one 'webapp'? And not create 10,000 web apps? That the App itself deals with the virtual hosts (by reading the host header), and not tomcat? Andrew On 26/08/2006, at 12:30 PM, KEGan wrote: I tried to use only Tomcat since the static content is dynamically generated. Think blogging application. However, users dont update the data that often, that's why I generate the content and make it static for web access, as oppose to dynamically generate the content each time it is requested. Using minimal CPU cycles. Also, I tried to use ONLY Tomcat and do away with integration of Apache HTTP + Tomcat, or Lighthttpd + Tomcat, because its would be easier to maintain. - 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: multiple virtual hosts and ssl certificates
You can only have 1 ssl certificate per IP address Andrew On 25/08/2006, at 11:09 AM, teknokrat wrote: I am trying to set up tomcat with multiple virtual hosts, each with their own SSL certificate. Is this possible? Do I add each certificate to the main keystore as per one host? - 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: multiple virtual hosts and ssl certificates
Peter is correct - I was just being a bit lazy in my answer... The ssl connection is setup BEFORE any 'hostname' information is passed over the link, and therefore the server would not know 'which' virtual hostname's ssl certificate to use. Therefore - 1 certificate per IP Address/ Port combination. Cheers Andrew On 25/08/2006, at 12:22 PM, Peter Crowther wrote: From: Andrés González [mailto:[EMAIL PROTECTED] I mean, what are you saying? That tomcat can only have 1 ssl certificate per IP address, or that it is a general limitation of the architecture of SSL certificates. It is a general limitation of SSL. To be strict: you can only have one certificate per *endpoint*, that is, IP address/port combination. - 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: do I need Apache httpd?
No you do not need Apache, unless your static content is MUCH greater than your dynamic content - And even then, with a low volume site, it really doesnt make any difference Regards Andrew Nolan Johnson wrote: I've got a webapp that's entirely dynamic. That is, all of the content is produced by servlets through Tomcat. The only static content for the site is a .css file and a small error page. Is there any reason for me to have Apache httpd listening on port 80 and have that connected to Tomcat with mod_jk2, or should I just have Tomcat's http server listen on port 80? - 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: difference between thread and session
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear anonymous You may want to invest a few dollars and buy yourself this book... http://www.oreilly.com/catalog/headservletsjsp/ Regards Andrew On 14/08/2006, at 2:40 PM, Tomcat wrote: Hello what is the difference between thread and session in tomcat ? I was thinking that they are the same, but in server setting of tomcat manager it shows different thread number to session number in application list. Thanks for help -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFE4HE3W126qUNSzvURAusbAJ9OHPLZT7Z+3LYOBZ9ZBc9alah5BwCfVdX7 sA8yThu6CruTtzdoiVGDCAQ= =MxLW -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: Tomcat Upgrade
Hi Ibrahim, What do you mean you don't want to do a parallel installation?! How do you want to check if it works?! Install TC 5.5 and java 1.4+compat libs or JVM 1.5 on the test machine, copy the stuff across, and start it and see what happens. You do have a test system? don't you?! Worried... Andrew [EMAIL PROTECTED] wrote: Andrew, Our website is developed using Vignette Content Management components. These comprise of VCMS and VMCM. We need to upgrade these two versions and due to matrix compatibility issues, we are forced to upgrade Tomcat to 4.1.12. In this upgrade, we don't want to do a parallel installation, rather work w/the existing system. So would your steps be correct for such a scenario? Thanks, Ibrahim - 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: Tomcat Upgrade
On 28/07/2006, at 6:55 PM, [EMAIL PROTECTED] wrote: Anyone know of website which has a step by step procedure to upgrade? What exactly is your problem with upgrading? The 'webapp' or the installation of tomcat 5? I would just install a new version of tomcat, with the JVM that you want, parallel, then then install your webapp - and see what happens. I don't quite understand the problem... Regards Andrew - 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: Problem with next error during login: Number of simultaneous users reached
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html This is per default installed with Tomcat 5.0 You will need to add a role to tomcat/conf/users.xml Regards Andrew On 25/07/2006, at 2:51 PM, Jan Line wrote: Thanks Leon for the pointer. I see that lambdaprobe may help with our issue. But we cannot install this new application because our production environment is very concerned about new tools. That is the reason we are trying to get some info with solaris tools. We are limited but for the moment is the only toolkit we may use. See you, -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFExhXmW126qUNSzvURAsRmAJ40FYMpgKuz3n01tiOcl8hhOvHdUQCfSoUx L01NDzMrUykavkQx9V6ydT8= =41eh -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]