Fixes #3969 - Frequent “Lost connection to MySQL server during query” errors resulting in client-side Error 500.
This commit is contained in:
parent
4cb5a7776b
commit
ca2885dce0
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ when 'mysql2'
|
||||||
# Because of missing ticket updates in high load environments
|
# Because of missing ticket updates in high load environments
|
||||||
# we changed the transaction isolation level equally to postgres
|
# we changed the transaction isolation level equally to postgres
|
||||||
# to READ COMMITTED which fixed the problem entirely #3877
|
# to READ COMMITTED which fixed the problem entirely #3877
|
||||||
ActiveRecord::ConnectionAdapters::Mysql2Adapter.set_callback :checkout, :before do |conn|
|
ActiveRecord::ConnectionAdapters::Mysql2Adapter.set_callback :checkout, :after do |conn|
|
||||||
conn.execute('SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED')
|
conn.execute('SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED')
|
||||||
end
|
end
|
||||||
when 'postgresql'
|
when 'postgresql'
|
||||||
|
|
Loading…
Reference in a new issue