Strange ActiveRecord timeout error after threading changes in r. 8892 ---------------------------------------------------------------------
Key: JRUBY-3475 URL: http://jira.codehaus.org/browse/JRUBY-3475 Project: JRuby Issue Type: Bug Affects Versions: JRuby 1.2 Reporter: Peter K Chan Assignee: Thomas E Enebo I discovered a strange bug when testing my app against latest unreleased version of JRuby. My app uses ActiveRecord (older version) to access an embedded H2 database. With the latest trunk version, I started seeing sporadic but regular errors such as: {quote} ==ActiveRecord::ActiveRecordError: Statement was canceled or the session timed out; SQL statement: SELECT count(*) AS count_all FROM copies WHERE (node_id = 3 AND (status = 310)) [90051-104]: SELECT count(*) AS count_all FROM copies WHERE (node_id = 3 AND (status = 310)) (ActiveRecord::StatementInvalid)== /C:/work/bun/target/classes/active_record/connection_adapters/abstract_adapter.rb:135:in `log' /C:/work/bun/target/classes/active_record/connection_adapters/jdbc_adapter.rb:537:in `execute' /C:/work/bun/target/classes/active_record/connection_adapters/jdbc_adapter.rb:597:in `select' /C:/work/bun/target/classes/active_record/connection_adapters/jdbc_adapter.rb:533:in `select_one' /C:/work/bun/target/classes/active_record/connection_adapters/abstract/database_statements.rb:19:in `select_value' /C:/work/bun/target/classes/active_record/calculations.rb:212:in `execute_simple_calculation' /C:/work/bun/target/classes/active_record/calculations.rb:121:in `calculate' /C:/work/bun/target/classes/active_record/calculations.rb:117:in `catch' /C:/work/bun/target/classes/active_record/calculations.rb:117:in `calculate' /C:/work/bun/target/classes/active_record/calculations.rb:45:in `count' /C:/work/bun/target/classes/ui/uibase.rb:422:in `getStatus' {quote} After binarily searching two dozens revisions, I discovered that the changes in r. 8892 trigger this error message. The change log for that revision states: {quote} Juggle thread association around again to get some Thread.list tests passing more reliably in pooled mode. Really needs a refactoring one of these days. {quote} I am neither certain of the exact causes of this error, nor the meaning before the changes in that particular revision. However, the changes in that particular revision reliably triggers the ActiveRecord DB error. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email