Page 1 of 1

Slowdown when idle

Posted: Fri 13 Apr 2007 22:23
by wcarlson40
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..

Posted: Mon 16 Apr 2007 06:12
by Alexey
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?

Posted: Mon 16 Apr 2007 17:41
by wcarlson40
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.

Posted: Tue 17 Apr 2007 07:00
by Alexey
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.

Posted: Tue 17 Apr 2007 23:49
by wcarlson40
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).

Posted: Wed 18 Apr 2007 06:34
by Alexey
Unfortunately, this timeout is hard-coded.