Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I stopped a php program by ctrl-z, and bg 1 right away, but the connection seems not valid any more.

Isn't sleep supposed to restore all resources correctly?

share|improve this question
Shore, this belongs on Serverfault. – Aiden Bell Jun 13 '09 at 1:35
Also a bit of Google would help. A quick search of "PHP MySQL sleep" uncovered alot of answers. – Aiden Bell Jun 13 '09 at 1:52

The local state is preserved when you stop a process, but the state of remote resources obviously cannot be maintained. If the remote MySQL instance times out the connection you need to reconnect.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.