Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveRecord::StatementInvalid: Mysql2::Error: Lost connection to MySQL server during query: SHOW TABLES LIKE 'users' #421

Closed
mohitnegi opened this issue Sep 19, 2013 · 4 comments

Comments

@mohitnegi
Copy link

@mohitnegi mohitnegi commented Sep 19, 2013

I'm using mysql2 0.3.13, rails 3.2.14, ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux] .. and I'm getting this problem intermittently on production. Any suggestions? My wait_timeout in mysql is set to 28800.

@sodabrew
Copy link
Collaborator

@sodabrew sodabrew commented Nov 20, 2013

What was the previous query? Your connection may have timed out before starting this query. Any other timeout values that are set low? Is reconnect enabled or disabled?

@brianmario
Copy link
Owner

@brianmario brianmario commented Jan 25, 2014

Sounds related to http://bugs.mysql.com/bug.php?id=65956

@WilliamDenniss
Copy link

@WilliamDenniss WilliamDenniss commented Mar 15, 2014

By any chance have you set the reaping_frequency ActiveRecord config? I found that the ActiveRecord connection reaper was causing this error. It's disabled by default in rails (for good reason it seems), but some some samples out there recommend enabling it (such as from Heroku).

See this issue from Rails rails/rails#9907 and my SO answer on this topic: http://stackoverflow.com/a/22423893/72176

@sodabrew
Copy link
Collaborator

@sodabrew sodabrew commented Apr 7, 2014

Closing per @WilliamDenniss blog post explaining the bad news reaping_frequency option. And lack of updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants