Re: mod_jk performance
Hi Peter, That is why I mentioned it. We deliver our static content from other servers, and had originally considered hiding our TCs behind apache for 'security reasons'. After seeing the speed difference, and the fact that their isn't really a security difference if you just push all the traffic straight through anyway, we decided not to put Apache between our users and our Tomcat servers. If I didn't need to use re-writes, and complicated rules on our apaches, I would also use THTTP for performance reasons. Andrew On Sep 16, 2005, at 3:39 PM, Peter Flynn wrote: OK, that's useful information. But I have 300,000+ static HTML files to server, and about 10 JSP files. I'm surely not switching my entire server to Tomcat...:-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
Apache is easier to configure, but at a 50% performance hit for pure JSP pages Andrew On Sep 14, 2005, at 2:18 PM, KEREM ERKAN wrote: Apache has better directory/file restricting and handling than Tomcat, it is more customizable and it is much user/admin friendly to configure :-) (at least for me) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
We did some comparisons between running Tomcat 5.0 standalone, or TC 5.0 and Apache 2.0 If you are ONLY delivering JSPs, we found that we could only deal with 50% of the requests when running combined Apache TC and mod_jk Andrew On Sep 14, 2005, at 2:45 PM, Lionel Farbos wrote: I use Apache/mod_jk/Tomcat for a long time on production servers with load balancing/failover (and with high traffic sites) and I'm sure it's not 30% slower than a pure Tomcat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
We run F5 BigIPs as our loadbalancers, and have seperated images, etc onto another server IE: i.domain.com for images, and www.domain.com for dynamic content. F5 provides a feature call iRules to do the splitting between hosts for you, but I would NOT use this on a high traffic site. Andrew On Sep 14, 2005, at 2:58 PM, Lionel Farbos wrote: But, in a web site, there is never only JSPs : there is a lot of static files (images, css, js, ...) So, if you don't have a apache in the frontend to deliver theses static files, there is an overload for the TC server... So, your tests stressed only light JSPs or a real site ? and what is your solution for load-balancing/failover ? On Wed, 14 Sep 2005 14:50:52 +0200 Andrew Miehs [EMAIL PROTECTED] wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems setting up tomcat on debian sarge
Hi Martin, I have tomcat 5.0.25 - 30 running on Sarge without a problem. Sun JVM 1.42r5 and greater. The orginal poster seems to have a problem with his application as manager applets etc work. I would however recommend running a 2.6 kernel Andrew On Sep 13, 2005, at 3:37 PM, Martin Wood wrote: I struggled with running tomcat5 on sarge for a while and found that the blackdown jvm was the only one that seemed to work properly. I had great problems using the Sun JVM (there was a thread on here about 6 weeks ago) whereby tomcat would just stop responding, and refuse to shutdown unless i killed the process. I've not had any problems since switching to blackdown. If you are going to try tomcat 5.5 then you'll need to remember to install the compatibility patch for using a 1.4 jvm. thanks, Martin Sébastien GALLET wrote - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does Tomcat work on dual processor systems?
Hi Asha, Asha Nallana wrote: We are using Tomcat4.1.18, JDK1.4.2, Apache1.3 and mod_jk2. And somewhere you mentioned Redhat 7.3. Isn't that VERY old? can you provide the output of uname -a ps auxw netstat -anp and probably server.xml Does this setup work? Did it ever work? or are you trying to get it to work for the first time? I would seriously suggest though, that you get someone in to help you look at this problem, as it sounds like you may require quite a bit of help to get it up and running - (probably about 3 weeks of using this mailing list) Regards Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Max thread/session timeouts
Ouch! Thats a LOT of threads - I can't believe your box still performs well with this many threads - or have you enabled keep-alives? The number of threads really depends on your application. I have max threads set to 750, or our 32bit 2.6 Linux systems. Our thread count normally doesn't go over 200. When the servers need to wait for the backend, and the requests start to queue (heading towards 1000) - you will end up with a huge problem anyway, as it is probably unlikely that your backend servers/ database, etc, will be able to catch up with the requests, but as I said, that depends how and what your application does. Andrew J. Ryan Earl wrote: As a reference, in conf/server.xml I set my thread limit to 1 max threads, 1000 max idle threads, and 100 on startup. I've seen my as many as 7K threads busy within my application. This is on a 32bit 2.6 Linux kernel with 2GB of RAM (-Xmx1500m). On the 2.4 kernel I found practical limitations in how many threads the kernel could multiplex between, saw frequent system hangs under high load where the whole server would become unusable. On either linux kernel, you probably want to increase your maximum number of file descriptors in /etc/security/limits.conf for your Tomcat user account(s). 16K nofile as default works great for me. How much more memory you need really depends on your application. 500 threads isn't that much memory overhead, but if each thread goes off and creates a bunch of objects while it's working you'll need to assure heapspace is available accordingly. The short answer is: try it out, play with it. 500 threads isn't a whole lot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rc3.d startup scripts
That really depends on the operating system. You may also want to have a look at google On Jun 17, 2005, at 8:34 PM, [EMAIL PROTECTED] wrote: I am trying to create a startup script for Solaris for both Tomcat 5.5.9 and Apache 2.0.52. Can anyone tell me how to do that, so that when the box is rebooted it automatically starts Tomcat and Apache.
Re: IE-Page not found problem
Hi, IMHO the best solution is to run tcpdump (or ethereel) on the server, and log the IE users traffic (and try to limit it to only 1 user as you seem to indicate that you can easily reproduce the problem). That will show you exactly what is going on. Anything else is just speculation. Regards Andrew sudip shrestha wrote: I have no idea why you are continuing on this pathBut all I am looking for is suggestions on how to debug this problem with IE, if there is any. I am not offerring any excuse!! It's my work related work. I have had few issues with IE in the past such as url redirection problem but I have managed to find the fix for those. So, I was thinking maybe somebody in the users list have had some kind of positive experience with this in the past. Frank's suggestion on this regard was constructive. I work in a huge company...suddenly asking users to change the browser is not exactly the pratical solution either. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat jsessionid
Are you load balancing? or do you have two different applications on two different servers? The cookie is attached to the host name. Therefore you will have two JSESSIONIDs One cookie: hostA:JESSIONID and the other hostB:JESSIONID Or do both hosts A and B have BOTH applications? IE: Can someone access http://hostA/abc and https://hostA/abc ? - If so - and these are two different appications - you will have problems. Andrew On May 16, 2005, at 4:54 PM, Millie Morton wrote: As a systems admin I've set up the following apache-2.0.54 tomcat-5.0.28 We are loadbalancing (tomcat) 2 different applications with the same path, one under SSL on hostA and the other unsecure on hostB. Application A: http:/hostA/abc Application B: https:/hostB/abc The problem is: if a user goes to Application A (on hostA) first and then to Application B (on hostB) we are seeing apache log entries with 2 JSESSIONIDS, one from hostA and one from hostB. This makes for stickiness problems as you can imagine. Is there a way to fix this without changing the path for one of the apps? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat taking 125 seconds to launch
hmm - sounds like a dns lookup causing a problem Andrew On Apr 4, 2005, at 11:03 AM, t.n.a. wrote: Michael Mehrle wrote: The configuration is a modified version of appfuse 1.5 (struts and hibernate) - so this should give you a good idea of how it is structured. FYI: on my development machine here at home Tomcat starts in 28 seconds - identical project and configuration. A fairly long time, any way you cut it. It takes about 6-9s on my Athlon 1900+ (using JDK 1.5), and a couple of seconds more on my laptop (even though the laptop has a 2.8GHz P4!, but runs blackdawn jdk 1.4). Just a wild guess, but it seemes to me that you have a 2-minute timeout on something, and than tomcat normally loads in 5-6s. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat taking 125 seconds to launch
how about running tcpdump on the box to see what it is doing when you start tomcat? Andrew On Apr 4, 2005, at 5:46 PM, Michael Mehrle wrote: You guys might be on to something - on my development machine it's taking only 25 seconds or so (identical code, tomcat version, and mysql installation). Question is: how do I fix a possible DNS lookup problem? - Original Message - From: Andrew Miehs [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Monday, April 04, 2005 2:02 AM Subject: Re: Tomcat taking 125 seconds to launch hmm - sounds like a dns lookup causing a problem Andrew On Apr 4, 2005, at 11:03 AM, t.n.a. wrote: Michael Mehrle wrote: The configuration is a modified version of appfuse 1.5 (struts and hibernate) - so this should give you a good idea of how it is structured. FYI: on my development machine here at home Tomcat starts in 28 seconds - identical project and configuration. A fairly long time, any way you cut it. It takes about 6-9s on my Athlon 1900+ (using JDK 1.5), and a couple of seconds more on my laptop (even though the laptop has a 2.8GHz P4!, but runs blackdawn jdk 1.4). Just a wild guess, but it seemes to me that you have a 2-minute timeout on something, and than tomcat normally loads in 5-6s. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Altering default HTTP header fields for serving static content
If you really want the browser not to cache images, you are better off putting a timestamp on the end of the requests - as no-cache does not convince every browser all of the time... ie: http://localhost/image.gif?78927842303 On Mar 2, 2005, at 6:46 AM, [EMAIL PROTECTED] wrote: Is there a way to alter the default HTTP header fields when a request is made to Tomcat for static content? I would like to be able to add the Cache-Control general header field with value no-cache when serving images so they are not cached on the client side. Can anyone please help? I've tried looking everywhere but can't find a solution. Thanks in advance... David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Load balancing SSL sessions
We use F5 BigIPs, but they are probably overkill for your application - The cisco probably will be as well. A 'Cheap' software solution might be to work with redirects, and 2 separate IP addresses. ie: ssl1.mysite.com and ssl2.mysite.com - You will need 2 ssl keys though for this to work. Does all of your app require ssl? or just a certain part, ie: payment. Do you need the stickiness for the whole app? or just for the ssl (seeing you are using tomcat, you will probably need it for the whole app)... Andrew On Feb 22, 2005, at 10:24 PM, Kelly Vista wrote: Hi - We are looking to deploy our app, running on Tomcat 5, soon and are exploring load balancing options. We are looking at H/W and S/W solutions, and I was wondering if anyone had any past experience/advice they would like to share. Our deployment is as pretty run-of-the-mill as it gets: 2 machines, each running Tomcat. We would like to avoid replicating state (since we have a lot of state in these apps, for reasons beyond our current control). Even in-memory session replication would not be option here, so we're punting on the Tomcat cluster solution. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Load balancing SSL sessions
Problem with round robin dns is that you can not guarantee that the web browser/ client will not make a second request to the dns server during the session - although very very unlikely. Andrew On Feb 22, 2005, at 11:01 PM, Filip Hanik - Dev Lists wrote: you can also use DNS round robin, www.mysite.com resolves to two or more IP addresses. Filip Andrew Miehs wrote: We use F5 BigIPs, but they are probably overkill for your application - The cisco probably will be as well. A 'Cheap' software solution might be to work with redirects, and 2 separate IP addresses. ie: ssl1.mysite.com and ssl2.mysite.com - You will need 2 ssl keys though for this to work. Does all of your app require ssl? or just a certain part, ie: payment. Do you need the stickiness for the whole app? or just for the ssl (seeing you are using tomcat, you will probably need it for the whole app)... Andrew On Feb 22, 2005, at 10:24 PM, Kelly Vista wrote: Hi - We are looking to deploy our app, running on Tomcat 5, soon and are exploring load balancing options. We are looking at H/W and S/W solutions, and I was wondering if anyone had any past experience/advice they would like to share. Our deployment is as pretty run-of-the-mill as it gets: 2 machines, each running Tomcat. We would like to avoid replicating state (since we have a lot of state in these apps, for reasons beyond our current control). Even in-memory session replication would not be option here, so we're punting on the Tomcat cluster solution. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Meaning of threads
Using the worker-mpm or fork-mpm, apache does the same nasty thing with threads and keep-alive, although I believe that when its starts running out of threads it stops offering keep-alives - and to make matters worse - for each connection you now have 2 threads - one for apache and one for tomcat - Andrew On Jan 25, 2005, at 6:46 AM, Sean M. Duncan wrote: What is the impact of having apache httpd allow keep alive requests when using the AJP connector to tomcat? Does this have any impact on tomcat's thread usage? How well does httpd itself deal with keep alive pipelines under a heavy user load? -Sean - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Meaning of threads
I would also consider turning of keepalive. Unfortunately tomcat (and apache) both setup one thread per connection. You may be able to use squid as a reverse proxy if you are having load/ number of connection/ thread problems depending on your application Andrew On Jan 24, 2005, at 10:11 PM, Filip Hanik - Dev wrote: maxThreads=150 your server can handle a maximum of 150 concurrent clients minSpareThreads=25 if your server is idle, it will at least have 25 threads waiting to handle requests maxSpareThreads=75 if your server is idle, it will have no more than 75 threads waiting to handle requests you get the direction this is going in, right? Filip My server tends to lock out a user who bombards it with requests so I'm wondering whether those options have anything to do with it before I post the problem here. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Meaning of threads
On Jan 24, 2005, at 11:09 PM, Steffen Heil wrote: Hi the number of threads will depend on the size of your machine, but to support many concurrent users, you will want to turn off keep alive connections, as these will have the opposite effect. Wouldn't it make more sense to enable keep alive connections and increase the thread count - if memory suffices? Unfortunately not. IMHO threads are over used and over rated. Have a look at the reasons THTTPD and Zeus webserver were created. I was told that the 'Java Servlet Spec' (I think this was the one) requires one thread per connection. I can understand the reasoning behind this, as it makes the implementation much easier. In my experience however, this does NOT work well in a high traffic situation. It makes NO sense for a machine to need to deal with 1000+ threads. (Unless of course you have an E15000 in the basement with 1000 processors). I had major problems with Debian Woody as the supplied Glib C as I was unable to get java to start more than 250 threads. Sarge was better in that it supported the new linux threading library out of the box. I do not have any experience with Solaris or Windows when dealing with that many threads. You need to disable keep-alives, becuase if you don't you end up wasting a lot of threads that just sit waiting for the next request on that connection - meaning even more threads just hanging around. The scary thing is, imagine something hangs on the backend for 30 seconds, and then all your 1000 threads start trying to do something at once You will end up with a load of 1000 and ALL your requests will take a long time to return. It may be interesting to replace the http connector for tomcat with one that uses select and uses 'threads' as a type of worker pool. This way, you can deal with all the connections in the select loop (incl. keep-alive) and still have the advantage of not needing to remember state due to the worker threads to the back end... My 2c Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] HTTP Sniffers
Pardon my ignorance, but what about tcpdump or snoop??? And if you have problems with those, have a look at ethereel Andrew Didier McGillis wrote: Considering this is a pretty knowledgable group is there a good free HTTP Sniffer application I can use, I need to see what the HTTP headers are returning on my site. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Doubts with tomcat
Tomcat starts 5 connector threads, plus the other internal threads that it uses for its own house keeping. Andrew On 08.11.2004, at 08:29, Michael Echerer wrote: 1) When I start tomcat with above server.xml , it creates 9 process with same output on shell. it is I configured tomcat to run with minSpareThreads=5 then why it start with 9 threads? You configured 5 connector threads that not necessarily match OS threads (or whatever you saw). Check with Tomcat's manager application how many connector threads you really have. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Timeout
Does anyone know any way that I can tell tomcat to kill the 'thread' if it isn't back in a ready state within 30 seconds? (waiting for new requests) Thanks Andrew On 05.11.2004, at 16:20, Phillip Qin wrote: Byte recv and byte sent? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 10:18 AM To: Tomcat Users List Subject: Re: Connection Timeout Hi Phillip, The request is for example a 10K image. Regards Andrew On 05.11.2004, at 16:11, Phillip Qin wrote: My guess is the request was serviced by Tomcat, and took that much time. What did your request column tell? A huge request, file upload? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 4:24 AM To: Tomcat Users List Subject: Connection Timeout Dear List, In /manager/status, I occasionally see connections where the status is 'S' and the time column is huge! 1 ms. Does this mean that the request is still being processed by tomcat? or is this a request waiting to be picked up - ie: chunked? If so, is there any way I can set a timeout for this, as a time 10 seconds makes very little sense with our application? Thanks in advance, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection Timeout
Dear List, In /manager/status, I occasionally see connections where the status is 'S' and the time column is huge! 1 ms. Does this mean that the request is still being processed by tomcat? or is this a request waiting to be picked up - ie: chunked? If so, is there any way I can set a timeout for this, as a time 10 seconds makes very little sense with our application? Thanks in advance, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Timeout
Hi Phillip, The request is for example a 10K image. Regards Andrew On 05.11.2004, at 16:11, Phillip Qin wrote: My guess is the request was serviced by Tomcat, and took that much time. What did your request column tell? A huge request, file upload? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 4:24 AM To: Tomcat Users List Subject: Connection Timeout Dear List, In /manager/status, I occasionally see connections where the status is 'S' and the time column is huge! 1 ms. Does this mean that the request is still being processed by tomcat? or is this a request waiting to be picked up - ie: chunked? If so, is there any way I can set a timeout for this, as a time 10 seconds makes very little sense with our application? Thanks in advance, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:418b46a1164289526310470! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Timeout
Hi Phillip, S506331 ms17 KB0 KBx.x.2.24www.x.comGET /x//img/x/Image.gif HTTP/1.1 Regards Andrew On 05.11.2004, at 16:20, Phillip Qin wrote: Byte recv and byte sent? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 10:18 AM To: Tomcat Users List Subject: Re: Connection Timeout Hi Phillip, The request is for example a 10K image. Regards Andrew On 05.11.2004, at 16:11, Phillip Qin wrote: My guess is the request was serviced by Tomcat, and took that much time. What did your request column tell? A huge request, file upload? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 4:24 AM To: Tomcat Users List Subject: Connection Timeout Dear List, In /manager/status, I occasionally see connections where the status is 'S' and the time column is huge! 1 ms. Does this mean that the request is still being processed by tomcat? or is this a request waiting to be picked up - ie: chunked? If so, is there any way I can set a timeout for this, as a time 10 seconds makes very little sense with our application? Thanks in advance, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:418b99c3205412059510077!
Re: Huge tomcat memory footprint
Hi Anand, We currently have a similar problem. Under load the JVM consumes more and more memory. (We are using tomcat 5.0 and Sun JVM 1.4.2 and linux (debian sarge)) In our case it looks as if the Garbage Collector is not getting enough time to free memory - but this is still very much a guess. You may want to have a look in this direction however. We are currently looking at see what setting we can tune for the GC or maybe using a different JVM. Good luck, Andrew -Original Message- From: Anand Narasimhan [mailto:[EMAIL PROTECTED] Sent: Monday, November 01, 2004 5:26 PM To: [EMAIL PROTECTED] Subject: Huge tomcat memory footprint Hi, I am not able to determine if the problem is related to tomcat, solaris or the application itself. Any help/pointers to debug the problem will be greatly appreciated. The application runs on Solaris 2.8 using Sun's Java version 1.4.1_02. The tomcat version is 4.1.27. The GUI is written using HTML/JSP/Struts 1.0.2. The database is Oracle version 8.x (I think). The application also has API interface written using Java/XML/Soap etc. The application is memory/CPU intensive. The problem I am having is, after running under a large load, tomcat process's memory footprint (reported by top command) increases rapidly to more that 2G. The heap size (max configured to 1G), increases to about 500 - 600M. I have tried running tomcat with optimizeit to see if there are any memory leaks. optimizeit as wells as the output from GC (running with -verbose:gc, -XX+PrintGCDetails) shows frequent garbage collection activity and the heap size does not grow too much. I am not able to figure out why the process memory grows. If the heap is not growing too much, what is consuming the memory? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat in a High Traffic Environment
Dear List, I am new to the list and have a few questions about Tomcat 5.0. We are attempting to use tomcat in a High Traffic, many simultaneous Internet user environment. I have about 8000 simultaneous users, and plan on using 14 web servers. These servers connect via CORBA to a group of backend servers. The 14 web severs are load balanced with a hardware load balancer. How does Tomcat deal with connections? When a request from a user arrives, is it assigned a thread? and is this thread ONLY used for this connection, (including obtaining information from the backend) until the request is finished? How are keep-alives dealt with? When a user requests a keep-alive, is a thread held permanently for this user, until the connection is dropped? If this is the case, how is this ment to scale? A connection pool of 750 threads seems unusable... How can 1 thread per connection scale? or have I misunderstood how tomcat uses its connection pool? And should all of these threads ever have something to do at the same time, the box would just fall over with a load of 750 Would it not make more sense to use a smaller connection pool, and set up queues? Would it not then be better when the request has been processed, to put this into a second queue for requests which then go to the backend, etc, etc? So many threads can't help performance. Wouldn't the kernel be busy the whole time with context switching? and no user would ever get any data back Thanks in advance for any comments, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat in a High Traffic Environment
Hi Peter, The load balancer is an F5 and we are doing can do the balancing based on JSESSIONID. At the moment we are doing persistence based on our own cookie (Long story). How did you disable keep-alives? maxKeepAliveRequests=1 ? Doesn't it make more sense to use keep-alives? And what does tomcat really do with these keep-alive connections? Does it really keep 1 thread open for each keep-alive? this seems VERY unnecessary Regards Andrew On 29.10.2004, at 17:02, Peter Lin wrote: if you're using hardware load balancer like cisco localdirector, I would setup the load balancer to direct the traffic based on sessionid. this way, you don't need to use keep alive. when you say 8K simultaneous users, what does that translate to in terms of concurrent requests per second? An easy way to figure that out is to use a Http analysis tool like webtrends, or HttpAnalyze to generate statistics. I would look at the peak and average concurent requests. once you know that, it will be easier to determine if 14 servers are sufficient. peter On Fri, 29 Oct 2004 16:53:26 +0200, Andrew Miehs [EMAIL PROTECTED] wrote: Dear List, I am new to the list and have a few questions about Tomcat 5.0. We are attempting to use tomcat in a High Traffic, many simultaneous Internet user environment. I have about 8000 simultaneous users, and plan on using 14 web servers. These servers connect via CORBA to a group of backend servers. The 14 web severs are load balanced with a hardware load balancer. How does Tomcat deal with connections? When a request from a user arrives, is it assigned a thread? and is this thread ONLY used for this connection, (including obtaining information from the backend) until the request is finished? How are keep-alives dealt with? When a user requests a keep-alive, is a thread held permanently for this user, until the connection is dropped? If this is the case, how is this ment to scale? A connection pool of 750 threads seems unusable... How can 1 thread per connection scale? or have I misunderstood how tomcat uses its connection pool? And should all of these threads ever have something to do at the same time, the box would just fall over with a load of 750 Would it not make more sense to use a smaller connection pool, and set up queues? Would it not then be better when the request has been processed, to put this into a second queue for requests which then go to the backend, etc, etc? So many threads can't help performance. Wouldn't the kernel be busy the whole time with context switching? and no user would ever get any data back Thanks in advance for any comments, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat in a High Traffic Environment
Hi Yoav, I have not read the Servlet Spec, so please pardon my ignorance. (Definitely do not mean to offend). What I still haven't had clearly answered is: User A sends request (with keepalive) to tomcat. Tomcat assigns request to thread (T1). Tomcat sends result back. Is thread T1 now kept reserved for user A until he/ or tomcat closes the keep-alive connection? If this is the case, and I now have 1000 users, each with 2 connections per user (ie: 2000 connections) do I need 2000 threads? What if the requests each only take a very short amount of time? The server is capable of answering a lot more requests than those from the 1000 users, but due to the number of connections and threads, I am limited to the 1000 users per machine... Or am I just missing something here... I can understand the issue with the one thread one request in the Spec - am just wondering if there isn't a better way, as I can not see how this can possible scale in a high traffic environment - or maybe I just don't understand... :-( Thanks Andrew On 29.10.2004, at 17:28, Shapira, Yoav wrote: Hi, these keep-alive connections? Does it really keep 1 thread open for each keep-alive? this seems VERY unnecessary Remember that the Servlet Spec mandates the Servlet Container service a request with one thread, independent of the HTTP details. So before you think we're clueless when it comes to performant connection handling design, please keep that in mind ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat in a High Traffic Environment
The loadbalancer forwards the packet to tomcat, and as such, tomcat sees the keep-alive request. If tomcat has keep-alive enabled, it will set up keep alive on its end. Andrew On 29.10.2004, at 17:31, Peter Lin wrote: you don't need to use keepalive. generally, in a load balanced setup, keepalive is disabled because the load balancer is already making sure the user goes to the same webserver for the life time of the session. keepalive is usually set in the HTTP header by the client, so I don't think you need to do anything to tomcat's config. someone correct me if I'm wrong. remy can provide a better description of what happens in the case a browser wants to use keep alive. peter On Fri, 29 Oct 2004 17:20:18 +0200, Andrew Miehs [EMAIL PROTECTED] wrote: Hi Peter, The load balancer is an F5 and we are doing can do the balancing based on JSESSIONID. At the moment we are doing persistence based on our own cookie (Long story). How did you disable keep-alives? maxKeepAliveRequests=1 ? Doesn't it make more sense to use keep-alives? And what does tomcat really do with these keep-alive connections? Does it really keep 1 thread open for each keep-alive? this seems VERY unnecessary Regards Andrew On 29.10.2004, at 17:02, Peter Lin wrote: if you're using hardware load balancer like cisco localdirector, I would setup the load balancer to direct the traffic based on sessionid. this way, you don't need to use keep alive. when you say 8K simultaneous users, what does that translate to in terms of concurrent requests per second? An easy way to figure that out is to use a Http analysis tool like webtrends, or HttpAnalyze to generate statistics. I would look at the peak and average concurent requests. once you know that, it will be easier to determine if 14 servers are sufficient. peter On Fri, 29 Oct 2004 16:53:26 +0200, Andrew Miehs [EMAIL PROTECTED] wrote: Dear List, I am new to the list and have a few questions about Tomcat 5.0. We are attempting to use tomcat in a High Traffic, many simultaneous Internet user environment. I have about 8000 simultaneous users, and plan on using 14 web servers. These servers connect via CORBA to a group of backend servers. The 14 web severs are load balanced with a hardware load balancer. How does Tomcat deal with connections? When a request from a user arrives, is it assigned a thread? and is this thread ONLY used for this connection, (including obtaining information from the backend) until the request is finished? How are keep-alives dealt with? When a user requests a keep-alive, is a thread held permanently for this user, until the connection is dropped? If this is the case, how is this ment to scale? A connection pool of 750 threads seems unusable... How can 1 thread per connection scale? or have I misunderstood how tomcat uses its connection pool? And should all of these threads ever have something to do at the same time, the box would just fall over with a load of 750 Would it not make more sense to use a smaller connection pool, and set up queues? Would it not then be better when the request has been processed, to put this into a second queue for requests which then go to the backend, etc, etc? So many threads can't help performance. Wouldn't the kernel be busy the whole time with context switching? and no user would ever get any data back Thanks in advance for any comments, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: extraordinarily stupid question
mv $TOMCAT_HOME/server/webapps/manager $TOMCAT_HOME/server/webapps/newmanager On 29.10.2004, at 17:45, joon yoo wrote: After I install tomcat 5.0, the tomcat management page is on http://tomcat:8080 How can this management page be obscured/moved to a different url and then, how can a redirector to http://tomcat:8080/application be put in for that root address? Thanks for any help, joon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat in a High Traffic Environment
Hi Filip, Is this how you disable keep-alive on tomcat? maxKeepAliveRequests=1 or is there another switch that I am missing.. On 29.10.2004, at 17:49, Filip Hanik - Dev wrote: turn off keep alive - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat in a High Traffic Environment
Hi Peter, I am not using keep-alives to keep session persistence, but was rather hoping for better client performance. Using keep-alives saves creating a tcp connection for each request - and thereby saving 3 tcp packets (and roundtrip times) per request. Andrew On 29.10.2004, at 17:53, Peter Lin wrote: mladen makes a good point. the sites I've worked on, we left the keepalive up to the browser and didn't explicitly disable keepalive. the sites I've worked on we simply used hardware load balancer to make sure the session goes to the right server. that is usually enough from my experience. my bias perspective is, unless the users are sending requests very rapidly, I don't see much benefit to using keepalive. If the interval between requests is rather long, like minutes, I doubt keepalive would provide any measurable benefit. I would look at the statistics from the http logs to determine whether keepalive should be disabled or not. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat in a High Traffic Environment
On 29.10.2004, at 19:08, Peter Lin wrote: if you're looking for better client performance I would explore other areas first. 1. use gzip compression - this can reduce the html to 1/10th the size. your mileage will vary. This is being looked at - loadbalancer vrs tomcat 2. caching results on the web-tier Very dynamic content 3. putting the images on a dedicated image server Already being done. 2x Servers running apache - which also have this keep-alive problem. Running 1000 threads per server is NOT my idea of a good time. I will be having a look at a couple of other alternatives to apache over the next couple of weeks. Due to operating system/ kenerl overheads time for one request (time for 10 parallel requests)/10 (time for 1000 parallel requests)/1000 Squid is a good example of how you can server MANY connections without starting thousands of threads. 4. distributing your servers across multiple ISP. many service providers don't tell you this, but often their pipe is saturated and can't really handle a large number of concurrent requests. if you host your own servers i would recommend getting more than 1 connection and use different providers This is NOT a pipe saturation issue. The issue is definitely a tomcat/ number of connections issue. I already have this problem in my local network with load tests. Most browsers today are Http1.1 compliant, which means they are limited to 2 connections to the same server. Normally the browser will use the same connection to get the html and the other resources like images and javascript. This will only happen if keep-alives are enabled. If keep-alives are disabled each GET will be a new connection. The F5 load balancers (4.5) have a 'cool-feature?!' that 'forwards' the keep-alive connection through to the backend server - With the 4.5 version of the software they are doing packet mangling. This means that even though the cllient only has 2 connections, the load balancer multiplies this connection to EACH of the backend servers with which the client is communicating, ie: static servers get 2 connections per client, statistic servers get 2 connections per client, tomcats get 2 connections per client.. Version 9 of the software has just come out, and it does proxying this should hopefully help solve this problem - I am still in the process of testing the new version. Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]