Greetings,
I am using MySqlDirect.Net 3.50.12 with the .Net Enterprise Library January 2006 and Visual Studio 2005.
When deployed onto the servers of my ISP, the system I have developed occasionally throws a Lost Connection exception from the CoreLab library.
It turns out that my ISP has configured their MySql servers to drop any connections that remain idle longer than 200 seconds. This tends to tie in with the exceptions being experienced.
This morning, I changed the connection string in web.config to turn off connection pooling and no exceptions have been generated since.
Obviously I would like to use connection pooling for performance but am not sure how to deal with the connections being forcefully killed from the MySql server.
Any thoughts on how to continue using connection pooling but avoid the lost connection exceptions?
Any help would be much appreciated.
Regards,
Justin.
Lost connections
Hi Alexey,
Thanks for the reply.
As I am using the Enterprise Library, typical code in this scenario does not deal with opening/closing connections, etc. All of that code is abstracted into the Enterprise Library.
Is there a place within the Enterprise Library style coding that I can perform the Ping and re-open the connection if it is closed? Perhaps I need to custom code the Enterprise Library?
Thanks,
Justin.
Thanks for the reply.
As I am using the Enterprise Library, typical code in this scenario does not deal with opening/closing connections, etc. All of that code is abstracted into the Enterprise Library.
Is there a place within the Enterprise Library style coding that I can perform the Ping and re-open the connection if it is closed? Perhaps I need to custom code the Enterprise Library?
Thanks,
Justin.