Skip to content
Discussion options

You must be logged in to vote

MySQL has a connection lifetime. It expires whether you actively use it or not. There are two ways to solve this problem:

  1. You should catch the moment when the connection is broken (preferably for any reason) and reconnect with a query retry. You can do this yourself, or you can use cycle/database, where these issues are already resolved.
  2. You can reconnect every nth request or based on a timeout implemented on the PHP side.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by rustatian
Comment options

You must be logged in to vote
2 replies
@roxblnfk
Comment options

@btxlittle
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
R-question Question
2 participants