Defect #21222
openActiveRecord::StatementInvalid when trying to update user_setup
0%
Description
From time to time Redmine begins to fail every request with this error:
Started GET "/redmine/issues/78317" for 172.23.24.178 at 2015-11-12
13:03:15 +0300
Processing by IssuesController#show as HTML
Parameters: {"id"=>"38317"}
Completed 500 Internal Server Error in 2.0ms
ActiveRecord::StatementInvalid (TinyTds::Error: Attempt to initiate
a new Adaptive Server operation with results pending: EXEC sp_execut
esql N'SELECT MAX([settings].[updated_on]) AS max_id FROM [settings]
'):
app/models/setting.rb:226:in `check_cache'
app/controllers/application_controller.rb:97:in `user_setup'
So every action that requires update of user_setup failes with this error. This situation is barely reproducible and occurs as often as once in a few months making it absolutely impossible to use Redmine till it is restarted.
Environment setting are the following:
Redmine version 2.5.0.stable
Ruby version 2.1.5-p273 (2014-11-13) [x86_64-linux]
Rails version 3.2.17
Environment production
Database adapter SQLServer
No data to display