Ajay,
That's a mySQL error message.
In the jdbc url you can add parameters to automate reconnection:
autoReconnect should the driver attempt to re-connect if the
connection dies? (true/false) -> false
maxReconnects if autoReconnect is enabled, how many times should the
driver attemt to reconnect? -> 3
initialTimeout if autoReconnect is enabled, the initial time to wait
between re-connects (seconds) -> 2
If you've already have this set, do you see the Exceptions when/after
you bounce the database? I think you can also see this error message if
an admin kills a running database query from the processlist - the
client thinks the database has gone away.
If the above aren't the problem then maybe the communication between the
client and mysql server isn't "fast enough". You may have to tweak the
client and server connection timeout parameters (in my.cnf in the server).
You can also configure DBCP to give a pooled connection a kick to stop
it timing out (mysql times out idle connections after, IIRC, 8hrs by
default).
The parameter you need to set is validationQuery as per:
http://jakarta.apache.org/commons/dbcp/configuration.html
HTH,
Jon
Anto Paul wrote:
On 6/14/05, ajay kumar <[EMAIL PROTECTED]> wrote:
Hi Everybody,
This is Ajay Kumar.I implemented DBCP through tomcat
container.Some times when i run the webpages it is giving the
following Exception:
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server
connection failure during transaction. Attempted reconnect 3 times.
Giving up
What database you are using ? Read this doc
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Common%20Problems
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]