jvmroute with 8080
Hello, is there any need for the jvmroute property if we are proxying all web requests through Apache to a Cisco load balancer that is balancing all the tomcat servers on http 8080? My understanding is this is for AJP only but wanted to be sure. Thanks AD - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: DBCP and Firewall timeouts
we are using Jruby / Rails / Tomcat. I think what may be happening is that rails has its own connection pool in front of DBCP which could be causing the issue here, not sure yet. AD On Tue, Jul 7, 2009 at 12:20 PM, David Smith wrote: > Do you hold on to your connections in code or do you close them when > done with each request? If you hold on to them, they can still timeout > with or without a validationQuery set. > > --David > > AD wrote: >> unfortunately still not working. One thing that i noticed, when i >> clear my browser cookies, everything works fine again. One of the >> things we do is use cookie persistence to send a user to the same >> tomcat server (we need this for file uploads,etc). Is there anything >> in the session cookie that would cause this issue? >> >> Thanks >> AD >> >> On Thu, Jul 2, 2009 at 9:38 AM, Christopher >> Schultz wrote: >> David, >> >> On 7/1/2009 5:01 PM, David Smith wrote: >> >>> Christopher Schultz wrote: >> >>>> David, >> >>>> >> >>>> On 7/1/2009 10:49 AM, David Smith wrote: >> >>>>> It would and the performance hit is minimal if you use the ping >> syntax >> >>>>> in your validation query. I believe it looks like this: >> >>>>> validationQuery="/* ping */ SELECT 1" >> >>>> Note that both the PING is only applicable for MySQL when using >> >>>> Connector/J, and "SELECT 1" may only be applicable on certain >> databases >> >>>> (MySQL being one of them). >> >>>> >> >>> Right and I double checked the original post that started this thread. >> >>> AD described the environment as having MySQL 5.1 >> Apologies... the thread was broken somewhere along the way and the >> original message wasn't grouped with the others in my mail reader. The >> OP definitely said they were using MySQL 5.1. >> >> -chris > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: DBCP and Firewall timeouts
unfortunately still not working. One thing that i noticed, when i clear my browser cookies, everything works fine again. One of the things we do is use cookie persistence to send a user to the same tomcat server (we need this for file uploads,etc). Is there anything in the session cookie that would cause this issue? Thanks AD On Thu, Jul 2, 2009 at 9:38 AM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > David, > > On 7/1/2009 5:01 PM, David Smith wrote: >> Christopher Schultz wrote: >>> David, >>> >>> On 7/1/2009 10:49 AM, David Smith wrote: >>>> It would and the performance hit is minimal if you use the ping syntax >>>> in your validation query. I believe it looks like this: >>>> validationQuery="/* ping */ SELECT 1" >>> Note that both the PING is only applicable for MySQL when using >>> Connector/J, and "SELECT 1" may only be applicable on certain databases >>> (MySQL being one of them). >>> >> Right and I double checked the original post that started this thread. >> AD described the environment as having MySQL 5.1 > > Apologies... the thread was broken somewhere along the way and the > original message wasn't grouped with the others in my mail reader. The > OP definitely said they were using MySQL 5.1. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkpMuHIACgkQ9CaO5/Lv0PADewCfVnBaTKaGS/bnDm7DZiWkTj8x > 7JgAoMOO3vwM7gzLQXz8fWpGutVBclDR > =mPNr > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: DBCP and Firewall timeouts
would that simply be the testOnBorrow ? Is there a perf hit for this ? On Wed, Jul 1, 2009 at 4:00 AM, Mark Thomas wrote: >> --- Original Message --- >> From: AD >> To: Tomcat Users List >> Sent: 01/07/09, 04:37:26 >> Subject: DBCP and Firewall timeouts >> >> Is there a recommended config of ensuring the connection pool >> connections either get cleanly terminated or are sanity checked for >> proper connectivity? We are using JRuby/Tomcat/Rails and are seeing a >> lot of timeouts after inactivity in the app. > > Use a validation query on borrow. > > Mark > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
DBCP and Firewall timeouts
Hello, We have a tomcat 5.5 server and a mysql 5.1 database sitting between a firewall. The firewall times out connections after 60 minutes. We tried setting the minEvictableIdleTimeMillis to be 30 minutes but we are still seeing these timeouts. Is there a recommended config of ensuring the connection pool connections either get cleanly terminated or are sanity checked for proper connectivity? We are using JRuby/Tomcat/Rails and are seeing a lot of timeouts after inactivity in the app. Thanks AD - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: failed ActiveMQ hangs tomcat
Thanks. I thought it was interesting that ALL the tomcat applications went down when JMS was down, even if the apps that dont rely on it. Must be some blocking going on that is affecting all threads in the app server. On Sun, Feb 1, 2009 at 12:12 AM, Kirk True wrote: > Hi Adam, > > AD wrote: >> >> actually i think i did notice failover() with only 1 address in >> non-prod. I think the reason that was there was some config >> templating issue. >> >> Are you saying if you remove the failover and just go straight in this >> might resolve it? >> >> Will give it a shot >> > > Failover is great if you have another server to which to fail over ;) But if > there's only the one, it'll hang. However, there are some backoff settings > that can be adjusted so it shouldn't hang /forever/, but possibly for many > minutes. > > So, removing failover will change it to 'fail fast' behavior. Of course it > won't fix the core issue of the JMS server being down :\ > > Kirk > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: failed ActiveMQ hangs tomcat
actually i think i did notice failover() with only 1 address in non-prod. I think the reason that was there was some config templating issue. Are you saying if you remove the failover and just go straight in this might resolve it? Will give it a shot Adam On Sun, Feb 1, 2009 at 12:05 AM, Kirk True wrote: > Hi Adam, > > AD wrote: >> >> hello, >> >> i am running into a situation where if our JMS server is down >> (activemq) the tomcat application does not respond at all. Not sure >> why tomcat is relying so heavily on this connection , any ideas as to >> why this would be ? >> >> > > Does your ActiveMQ connection URL include the failover:// prefix? I've seen > applications hang near-indefinitely trying to fail over to the same (downed) > ActiveMQ server over and over again. > > One way to see where the actual hang is would be to get a thread dump. The > standard 'kill -3 ' of the Tomcat process (on Linux/UNIX) would do the > trick. > > This sounds more like a web application issue than an issue with Tomcat. > Also, if you have integration tests that connect to a live JMS server you > could experiment with 'pulling the cord' and see where it hangs. This would > then remove Tomcat from the equation. > > Kirk > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
failed ActiveMQ hangs tomcat
hello, i am running into a situation where if our JMS server is down (activemq) the tomcat application does not respond at all. Not sure why tomcat is relying so heavily on this connection , any ideas as to why this would be ? Thanks Adam - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: root context path - war file not unwar'd
Thanks charles, i thought there was an easier way to make a default webapp other than naming it ROOT.war. I will give that a shot to see if it works. Adam On Mon, Jan 19, 2009 at 10:36 PM, Caldarale, Charles R < chuck.caldar...@unisys.com> wrote: > > From: AD [mailto:straightfl...@gmail.com] > > Subject: root context path - war file not unwar'd > > > > I have an issue where inside a i set the context path > > of "/" to a directory inside webapps (myapp). > > This is bad practice, and gets your webapp deployed twice. Sounds like you > also didn't remove the existing webapps/ROOT directory, so you now have two > webapps fighting to be the default one. Since you're not doing things in > the recommended fashion, no particular behavior is guaranteed. > > What you should be doing: > > 1) Delete the existing webapps/ROOT directory, thereby removing the dummy > default webapp that ships with Tomcat. > > 2) Delete everything under Tomcat's work directory, since that likely is > very confused by now. > > 3) Remove the element from server.xml - it doesn't belong there. > > 4) Rename your webapp to ROOT.war, so it becomes the default webapp. > > 5) If you actually need a element for your webapp, place it in > META-INF/context.xml inside the ROOT.war file, or in > conf/Catalina/[host]/ROOT.xml; in either case, remove the path and docBase > attributes, since they're not allowed. (If your element contained > only path and docBase, you don't need one at all.) > > When redeploying a webapp, don't just randomly delete directories while > Tomcat is running. Use the manager webapp or the appropriate ant script to > do a proper redeployment. > > - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
root context path - war file not unwar'd
Hello, I have an issue where inside a i set the context path of "/" to a directory inside webapps (myapp). The issue is when i delete the directory , on first startup the directory is not available yet (not unwar'd yet it appears) so it auto-sets the root context path to the default tomcat application. If I simply restart tomcat, everything works as expected (because the directory is now there). Does anyone know if there is a way to ensure that new war files are unwar'd prior to any other execution so this doesnt screw up the context path settings? We like to delete the directory when deploying new wars since we have seen some issues not deleting the directories before. Tomcat 5.5.26 Java 1.6 Solaris 10 Thx Adam
Blocking
Server has been up for about 5 hours under almost zero load but I am concerned about some of the thread info in JConsole.. For example in Main Thread Name: main State: RUNNABLE Total blocked: 54 Total waited: 9 Does this indicate signifigant blocking? Maybe 10-15 requests total in the last 5 hours so cant imagine its the load. Java 1.6, Redhat Enterprise 5, Tomcat 5.5.27 Appreciate the help. Adam
mysql timeout
Hello, I am trying to troubleshoot an error that seems to occur quite frequently with no real solution. I constantly see com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure in my application after the app runs for a few days. Communication is fine, networking is fine, netstat even shows connected sessions. It appears one of the connection went stale but it is still being returned from the pool. I did some reading and it appears there are 2 options 1 - Set wait_timeout in MySQL very high , but still risky 2 - use something like DBCP to enforce a validation query for the connection from the pool. Does anyone have any feedback/advise on this issue? It appears to be quite common. I am running on Redhat Linux, Tomcat 5.5.26 Thanks Adam
Re: All threads (200) are currently busy
I did try connecting directly to 8080 on a few of the tomcat serviers in the cluster but the requests were just hanging. I can run the load test again though with apache out of the mix and see what happens. Adam On Sat, Nov 1, 2008 at 5:25 PM, Caldarale, Charles R < [EMAIL PROTECTED]> wrote: > > From: AD [mailto:[EMAIL PROTECTED] > > Subject: Re: All threads (200) are currently busy > > > > ah sorry, proxied through apache with mod_proxy_balancer on ajp port > > Can you try your load test directly into Tomcat on port 8080 and eliminate > one variable? If that test runs satisfactorily, you'll need to check into > your front-end configuration. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: All threads (200) are currently busy
ah sorry, proxied through apache with mod_proxy_balancer on ajp port On Sat, Nov 1, 2008 at 2:14 PM, Caldarale, Charles R < [EMAIL PROTECTED]> wrote: > > From: AD [mailto:[EMAIL PROTECTED] > > Subject: Re: All threads (200) are currently busy > > > > And yes these were all http requests for the web applicatoin > > for our load test. > > The wasn't quite the question. Are the requests being sent through your > httpd front end on the AJP port, or direct to Tomcat on its HTTP port > (8080)? > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: All threads (200) are currently busy
Yea the link above is the kill -QUIT output. We do have aanother webapp connected to an ActiveMQ broker so that makes sense. I assumed the same as you Charles, that Tomcat was "waiting" for work, but we were running a load test at the time and the responses were coming back slowly. Trying to nail down why Tomcat was waiting for requests , yet wouldnt respond to any when directly connected to it. I And yes these were all http requests for the web applicatoin for our load test. Adam On Sat, Nov 1, 2008 at 11:49 AM, Mohit Anchlia <[EMAIL PROTECTED]>wrote: > try kill -QUIT > > This will give you thread dump of tomcat and of course that will > include threads associated with your webapp > On Fri, Oct 31, 2008 at 5:22 PM, AD <[EMAIL PROTECTED]> wrote: > > Fair enough > > > > Tomcat 5.5, JVM 1.6, Redhat Enterprise 5, 8Gb Mem, 5Gb Heap. > > > > What is the best way to take a thread dump to see what processes are > > waiting? We have a few web apps deployed and it has proven tricky for me > to > > narrow this down. We ran some load tests and encountered these issues. > > > > Whats the best way to get the thread dump and find out what process is > hung > > in the webapp ? > > > > Thx > > Adam > > > > On Fri, Oct 31, 2008 at 7:31 PM, Caldarale, Charles R < > > [EMAIL PROTECTED]> wrote: > > > >> > From: AD [mailto:[EMAIL PROTECTED] > >> > Subject: All threads (200) are currently busy > >> > >> First, you need to provide some environmental information: Tomcat > version, > >> OS, JVM version, etc. > >> > >> > I am trying to find out after doing some load testing why > >> > tomcat is getting hung up on some threads. > >> > >> Put the blame where it belongs: you webapp is getting hung up, not > Tomcat. > >> > >> Take a thread dump and see where the threads are stuck. > >> > >> - 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] > >
Re: All threads (200) are currently busy
the pastie link that I sent in my original post which was a kill -QUIT when the problem was happening. On Fri, Oct 31, 2008 at 10:49 PM, Caldarale, Charles R < [EMAIL PROTECTED]> wrote: > > From: AD [mailto:[EMAIL PROTECTED] > > Subject: Re: All threads (200) are currently busy > > > > will it provide more info than what is in the kill -QUIT from > > above ? > > What "above" are you talking about? > > The jstack tool with the -l option provides the most information; kill -3 > is very similar, but omits the extra locking info which may be quite useful > in your situation. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: All threads (200) are currently busy
will it provide more info than what is in the kill -QUIT from above ? I am still struggling a bit to find out what process/library is blocking the thread in my app... Adam On Fri, Oct 31, 2008 at 9:43 PM, Litton, Tom - CEPM <[EMAIL PROTECTED]>wrote: > If you do a kill -3 on the process it will dump the stack trace to the > standard output stream. > > Sent from my iPhone > > > On Oct 31, 2008, at 7:23 PM, "AD" <[EMAIL PROTECTED]> wrote: > > Fair enough >> >> Tomcat 5.5, JVM 1.6, Redhat Enterprise 5, 8Gb Mem, 5Gb Heap. >> >> What is the best way to take a thread dump to see what processes are >> waiting? We have a few web apps deployed and it has proven tricky for me >> to >> narrow this down. We ran some load tests and encountered these issues. >> >> Whats the best way to get the thread dump and find out what process is >> hung >> in the webapp ? >> >> Thx >> Adam >> >> On Fri, Oct 31, 2008 at 7:31 PM, Caldarale, Charles R < >> [EMAIL PROTECTED]> wrote: >> >> From: AD [mailto:[EMAIL PROTECTED] >>>> Subject: All threads (200) are currently busy >>>> >>> >>> First, you need to provide some environmental information: Tomcat >>> version, >>> OS, JVM version, etc. >>> >>> I am trying to find out after doing some load testing why >>>> tomcat is getting hung up on some threads. >>>> >>> >>> Put the blame where it belongs: you webapp is getting hung up, not >>> Tomcat. >>> >>> Take a thread dump and see where the threads are stuck. >>> >>> - 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] >>> >>> >>> > > -- > The information contained in this transmission is intended only for > the personal and confidential use of the designated recipients named > herein. If the reader of this transmission is not the intended > recipient or an agent responsible for delivering it to the intended > recipient, you are hereby notified that you have received this > transmission in error, and that any review, dissemination, > distribution, or copying of this transmission is strictly prohibited. > If you have received this communication in error, please notify the > sender and return and delete the original transmission immediately. > Thank you. > > > > - > 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: All threads (200) are currently busy
Fair enough Tomcat 5.5, JVM 1.6, Redhat Enterprise 5, 8Gb Mem, 5Gb Heap. What is the best way to take a thread dump to see what processes are waiting? We have a few web apps deployed and it has proven tricky for me to narrow this down. We ran some load tests and encountered these issues. Whats the best way to get the thread dump and find out what process is hung in the webapp ? Thx Adam On Fri, Oct 31, 2008 at 7:31 PM, Caldarale, Charles R < [EMAIL PROTECTED]> wrote: > > From: AD [mailto:[EMAIL PROTECTED] > > Subject: All threads (200) are currently busy > > First, you need to provide some environmental information: Tomcat version, > OS, JVM version, etc. > > > I am trying to find out after doing some load testing why > > tomcat is getting hung up on some threads. > > Put the blame where it belongs: you webapp is getting hung up, not Tomcat. > > Take a thread dump and see where the threads are stuck. > > - 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] > >
All threads (200) are currently busy
I am trying to find out after doing some load testing why tomcat is getting hung up on some threads. Can anyone provide some info on how to track down where the blocking is happening here? I am unable to diagnose based on this dump.. http://pastie.org/305167 thanks Adam
Re: mod_proxy_balancer
Hassan, Sorry about the copy/paste issue, i meant to use AJP My issue is that the tomcat app, seems to want to redirect to /myapp1/some/file.html for a 302 (as an example) which is causing the issue. is there a way around this ? This path gets back to apache which gets back to the end user who does not know how to process /myapp1/ in the browser. Any reason this is a "bad" idea ? Thx Adam On Mon, Oct 13, 2008 at 10:17 PM, AD <[EMAIL PROTECTED]> wrote: > hello, > If i have a tomcat app deployed at http://localhost:8080/myapp1/ and > http://localhost:8080/myapp2/ and i want 2 virtualhosts in apache to map > "/" to each one of these apps, is this possible? > > Trying something like > > > BalancerMember ajp://localhost:8009/app1/ > BalancerMember ajp://localhost:8009/app1/ > > > > BalancerMember ajp://localhost:8009/app2/ > BalancerMember ajp://localhost:8009/app2/ > > > Then in each virtualhost > > HTTP Virtualhost 1: > ProxyPass / balancer://app1 > ProxyPassReverse / balancer://app1 > > HTTP Virtualhost 2: > ProxyPass / balancer://app1 > ProxyPassReverse / balancer://app1 > > but getting path errors all over. > > Thx > Adam > >
mod_proxy_balancer
hello, If i have a tomcat app deployed at http://localhost:8080/myapp1/ and http://localhost:8080/myapp2/ and i want 2 virtualhosts in apache to map "/" to each one of these apps, is this possible? Trying something like BalancerMember ajp://localhost:8009/app1/ BalancerMember ajp://localhost:8009/app1/ BalancerMember ajp://localhost:8009/app2/ BalancerMember ajp://localhost:8009/app2/ Then in each virtualhost HTTP Virtualhost 1: ProxyPass / balancer://app1 ProxyPassReverse / balancer://app1 HTTP Virtualhost 2: ProxyPass / balancer://app1 ProxyPassReverse / balancer://app1 but getting path errors all over. Thx Adam