Re: JVM unable to access MySQL intermittently?

2004-03-22 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Eric B. wrote:

 Hi,

 I'm running into a strange problem with my JVM and MySQL.  I'm using
 Macromedia JRun 4 as my JVM and everytime I restart the Jrun service, my
 application runs smoothly.  However, after an indeterminate amount of time
 (seemingly random - sometimes a couple of hours, sometimes 12-15
hours), my
 system is suddenly no longer able to access the MySQL database - my
queries
 are not being executed.  No error messages are thrown, nor any timeout's
 being hit.

 My problem is that I am not sure where to start debugging this problem.
 When it happens, I can see the MySQL threads (show full processlist) as
 being asleep for extended periods of time.  MySQL itself is alive, and
I am
 able to access it by manual queries through the command-line interface.

 This leads me to think that the problem either lies in my Connection
Pool or
 within the JConnector itself.  Is there any form of debugging I can enable
 in the JConnector to see if the JVM is actually attempting to make a
 connection and a query?  Or if a thread is being successfully retrieved by
 my Connection Pool?

 I'm running on MySQL 4.0.18 and JConnector 3.0.9.

 I am using autoReconnect=true and autoReconnectForPools=true as options to
 the JConnector.  I have also set the MySQL wait_timeout high (to
604800 = 1
 week) to ensure that it isn't a timeout problem I am seeing.

 Any help or suggestions would be greatly appreciated!

Eric,

If Connector/J is having trouble communicating with MySQL, it _will_
throw an exception. It just doesn't silently fail.

If you're not seeing _any_ exceptions being thrown, check where JRun is
logging exceptions. Do you have the opportunity to use a _different_ JVM
with JRun?

You might also try a newer version of Connector/J, to see if it changes
anything for your particular situation. You're using 3.0.9, while 3.0.11
is the latest production version.

-Mark


- --
Mr. Mark Matthews
MySQL AB, Software Development Manager, J2EE and Windows Platforms
Office: +1 708 332 0507
www.mysql.com

Meet the MySQL Team! April 14-16, 2004 http://www.mysql.com/uc2004/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAXx5XtvXNTca6JD8RArAoAJ44DsDFL2b6VXIX6akxQE17oOULyACfQEX7
faUZbxDOo0IpxHwtFHeslFU=
=/4wc
-END PGP SIGNATURE-

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



JVM unable to access MySQL intermittently?

2004-03-19 Thread Eric B.
Hi,

I'm running into a strange problem with my JVM and MySQL.  I'm using
Macromedia JRun 4 as my JVM and everytime I restart the Jrun service, my
application runs smoothly.  However, after an indeterminate amount of time
(seemingly random - sometimes a couple of hours, sometimes 12-15 hours), my
system is suddenly no longer able to access the MySQL database - my queries
are not being executed.  No error messages are thrown, nor any timeout's
being hit.

My problem is that I am not sure where to start debugging this problem.
When it happens, I can see the MySQL threads (show full processlist) as
being asleep for extended periods of time.  MySQL itself is alive, and I am
able to access it by manual queries through the command-line interface.

This leads me to think that the problem either lies in my Connection Pool or
within the JConnector itself.  Is there any form of debugging I can enable
in the JConnector to see if the JVM is actually attempting to make a
connection and a query?  Or if a thread is being successfully retrieved by
my Connection Pool?

I'm running on MySQL 4.0.18 and JConnector 3.0.9.

I am using autoReconnect=true and autoReconnectForPools=true as options to
the JConnector.  I have also set the MySQL wait_timeout high (to 604800 = 1
week) to ensure that it isn't a timeout problem I am seeing.

Any help or suggestions would be greatly appreciated!

Thanks,

Eric




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]