hemant
7/13/2007 11:45:00 PM
On 7/13/07, Eric Hodel <drbrain@segment7.net> wrote:
> On Jul 12, 2007, at 08:26, Mohamed Hussain wrote:
>
> > Hai
> > I have created one server using DRb
> > That server will run 24x7 and i am using MySql Database
> > Its running perfectly,some times it will get lose the
> > database and gives the error message
> > Database gone away
> > I dont know why this problem occurs
> > Can any body tell me the solution
>
> MySQL will drop the connection after a certain period of inactivity.
>
True, also make sure that you are using C version of mysql bindings.
Also often to handle dropped connections people take following apporach:
1. Have a base class that abstracts database connection pooling and
stuff and make sure that you handle the exception in this class and
reconnect to db.
2. Some libs, use a thread that keeps pinging mysql db with some dummy
query so that mysql doesn't drop the connection.
---
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.