6 messages in com.mysql.lists.javaRe: Why a fifteen minute response time?| From | Sent On | Attachments |
|---|---|---|
| Frank Burns | 18 Jul 2004 15:23 | |
| Christopher Marsh-Bourdon | 19 Jul 2004 00:59 | |
| Frank Burns | 23 Jul 2004 03:19 | |
| Kevin A. Burton | 23 Jul 2004 22:39 | |
| Kevin A. Burton | 24 Jul 2004 11:47 | |
| Xanana Gusmao | 05 Aug 2004 20:37 |
| Subject: | Re: Why a fifteen minute response time?![]() |
|---|---|
| From: | Christopher Marsh-Bourdon (chri...@pyplia.com) |
| Date: | 07/19/2004 12:59:39 AM |
| List: | com.mysql.lists.java |
Frank
Is there a firewall between your live server and the database server? If so you may have to take into account the timeout on the firewall.
I have a connection pool (Java) that I given a timeout for itself and the firewall(s) between the application and the database. If sufficient time has elapsed, just before the connections are blocked by the firewall, it drops them and re-instantiates them, thus getting round the timeout issue.
This is an old issue that I have remedied for a fair few customers in the past. If you would like the classes for my pool, I can send them to you.
Cheers
Christopher Marsh-Bourdon www.marsh-bourdon.com www.pyplia.com
On 18/7/04 23:24, "Frank Burns" <fran...@the-hub.demon.co.uk> wrote:
Hi,
Can you please help. I'm having problems with my responses from the database on my live server. I'm using Connector/J v3.0.10 and connecting from a servlet in a Tomcat webapp to a mySQL database on a linux server.
I create a connection to the database like this:
Connection conn = DriverManager.getConnection("jdbc:mysql://109.139.2.91/amx?autoReconnect=true" , "user1", "ace");
The servlet accesses the database with no problems when first invoked (i.e., when the webapp is restarted) and with no problems. However, if I leave it for some time, the connection times out, and if I invoke the servlet after that, it takes FIFTEEN minutes before I get a response back from the database!
On my test system (also a linux server), where I have the database on the same machine, I get no such time lag in responses after a time out.
So my questions are:
1) Why the lag?
2) Is this problem with Connector/J or is it the mySQL database configuration or something else?
Thanks,
Frank.
Christopher Marsh-Bourdon Pyplia Limited +44 (0) 20 7324 6060 Switchboard +44 (0) 77 4865 4660 Mobile +44 (0) 20 7324 6001 Fax www.pyplia.com WWW




