You can clone with
HTTPS or Subversion.
this commit 7cc588b add default reaping frequency and the reaping may remove connection in use
$ rails new temp
$ rails g model User name:string
namespace :test do
task :createusers => :environment do
$ rake rake test:createusers
#error output for gem 'mysql2'
Mysql2::Error: MySQL server has gone away: INSERT ...
Mysql2::Error: Lost connection to MySQL server during query: INSERT ...
#error output for gem 'pg'
undefined method `fields' for nil:NilClass #query result is nil
/cc @jonleighton @tenderlove
default the reaping frequency to 10 seconds
confirmed. This commit breaks mysql2 tests on my machine. Mysql adapter works fine.
+1 not able to run any mysql2 tests. Only for a fashionable 30 frequency did the tests run for me.
Crap, I totally forgot the test runner issue. I'll bump up this number in test.
I've reverted the commit. :-D
@tenderlove thanks for the revert
I'm using rails 4.0.0 with mysql2 and getting these errors still in my background workers.
undefined method `fields' for nil:NilClass
missing attribute: <random_column>
Mysql2::Error: MySQL server has gone away
Mysql2::Error: Lost connection to MySQL server during query
When the worker then goes to restart it works, so the issue is intermittent. Could this be related?