Slowdown when idle

Slowdown when idle

Postby wcarlson40 » Fri 13 Apr 2007 22:23

First of all, I have to say I am very impressed with MySQLDirect .NET. Performance is tons better than the Access databases I was using with Visual Basic .NET, and it really was not that hard to convert my application to MySQL with the help of CoreLabs products.

Anyways, this probably is not anything related to MySQLDirect, but I wondered if anybody would have any ideas.....

When connecting to my MySQL server, things move very fast, especially once all the connections are up and running. But, if my VB application sits idle for 20 minutes or so, and then I try to do something, there is a 10-15 second delay before it comes back 'online' again (and then it's all very quick again). I have connection pooling enabled (it's on by default, right?) and Persist Security Info set to True.

Any thoughts? I'm connecting to the server via a VPN, so I guess it could be the VPN going idle as well.... Not sure..
wcarlson40
 
Posts: 16
Joined: Tue 03 Apr 2007 20:21

Postby Alexey » Mon 16 Apr 2007 06:12

What is meant be "I try to do something"? Are you trying to reconnect or refresh some data? Could you reproduce same delay with another application connected via your VPN?
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby wcarlson40 » Mon 16 Apr 2007 17:41

Thanks for the reply.

Anyways, I've decided it's not related to the VPN. All other connections through the VPN show no delay after any amount of idle time.

What I mean by "I try to do something" is anytime I do anything in my VB program that requires access to the MySQL server I get the slowdown (and only after it has been sitting idle for 20 minutes or so). Otherwise, things run fine. It's almost like it has to re-establish the connection to the MySQL server again (even though connection pooling is enabled)

Thanks, any thoughts are appreciated.
wcarlson40
 
Posts: 16
Joined: Tue 03 Apr 2007 20:21

Postby Alexey » Tue 17 Apr 2007 07:00

Supposingly, you close the connection - right? After four minutes of inactivity it is removed from the pool and your application reconnects. Try to keep connection opened and before any operation check it with the Ping method.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby wcarlson40 » Tue 17 Apr 2007 23:49

Alexey wrote:Supposingly, you close the connection - right? After four minutes of inactivity it is removed from the pool and your application reconnects. Try to keep connection opened and before any operation check it with the Ping method.


Yes, that would be exactly it, happens right about after 4 minutes. Is there anyway to over-ride this 4 minute limit, or is it hard-coded? The reason I ask, is because my app was originally created with the Data Form Wizard in Visual Basic .NET (before conversion to MySQL), in which each different form that is in the application requires a separate database connection and has it's own dataset (hence, it has gotten pretty complicated).
wcarlson40
 
Posts: 16
Joined: Tue 03 Apr 2007 20:21

Postby Alexey » Wed 18 Apr 2007 06:34

Unfortunately, this timeout is hard-coded.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL