tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Application crash after Migrate to different ESX
Date Wed, 18 May 2011 15:50:37 GMT
-----BEGIN PGP SIGNED MESSAGE-----
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 com.vsgaming.app.appContext.getDatabaseConnection  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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3T6s0ACgkQ9CaO5/Lv0PB0ewCeJSe09OYCOGMMA3nDXwptBoQQ
qE8An3ZJELMtiwlgFVMbBd/Q1MTtdadY
=NkAO
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message