tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Application crash after Migrate to different ESX
Date Wed, 18 May 2011 15:50:37 GMT
Hash: SHA1


On 5/18/2011 4:20 AM, הילה wrote:
> this behavior occur even when I'm disconnecting the Network card from the VM
> settings and connecting it again.

At least it's reproducible in a way that you're willing to try in
production. What about reproducing it in development/test environments?
That would certainly be safer...

> afterwards, the keep alive is alternately unavailable.

That doesn't sound like keep-alive to me.

The JDBC protocol, to my knowledge, does not include any kind of
keep-alive or similar feature. To get that, you'll have to use some
other product in order to ensure that connections are valid before
trying to use them, otherwise you'll get exceptions being thrown.

In the case you posted to start this thread, it looked like the
connection was closed when it was obtained from a connection pool. How
does  get it's
database connections? Are you using a connection pool? If so, which one?

It sounds like you haven't enabled connection validation which is really
the only way to ensure that connections are valid when you check them
out of a pool. It's too bad that seems to cause crashes in your
webapp... I've never heard of that before. Sure, it causes a bit of a
performance drop but you can tune the validation so it doesn't run on
every connection check-out to help mitigate that performance loss.

I would look into why connection validation causes your webapp to crash.
(Strictly speaking, nobody in the Java world refers to an exception
being thrown as a "crash"... it's a relatively frequent occurrence even
though the user might not like it. Crashing is *much* worse than a
single request failing due to some exception.)

> looks like it's not
> always trying to approach the DB opened wireshark and saw that ip.addr==DB
> IP ADDRESS is not always showing results when the keep alive is unavailble =
> he's not trying to get to the DB at all, I think.

I cannot understand what you are saying above. Can you re-phrase it?

> it all sorts out after I restart the tomcat service. this is why I think it
> does related to tomcat.

Re-establishing all the database connections by any means will likely
correct everything. It still might have nothing to do with Tomcat. If
you tell us how you do database connection management, it might help.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message