Link to home
Start Free TrialLog in
Avatar of sunnybrad
sunnybrad

asked on

MySQL Server Timeout

Hi:

I am building a high scale back-end daemon.

The backend database for logging purpose is MySQL.

Code and everything works fine. Currently on my Ubuntu desktop
MySQL server works fine.......but at night sometime server goes to sleeps meaning
no client connect is possible and also API based connection does not work

When I try connecting though command line prompt I get the following messages:

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...

What's the way to have MySQL server up and running during long period of less activity or inactivity.

Best Regards,

-Sunnybrad
ASKER CERTIFIED SOLUTION
Avatar of db2inst1
db2inst1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
by default the connections timeout is 8 hours. you can increase it.
You can also using connection refresh mechanism, before its time out.

c3p0 library would help you in this regard.