MySQL Server Timeout


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,

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MySQL will be up and running, but it disconnects your connections if one of the timeout values specified has reached.

You could try increasing the timeout values,


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day 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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.