This project is archived and is in readonly mode.
ActiveRecord Connection Pool mutex problem
-
Justin Coyne
This stacktrace should be easier to read:
current thread not owner /home/jcoyne/jruby/current/lib/ruby/1.8/monitor.rb:278:in
mon_check_owner' /home/jcoyne/jruby/current/lib/ruby/1.8/monitor.rb:224:inmon_exit' /home/jcoyne/jruby/current/lib/ruby/1.8/monitor.rb:242:inmon_synchronize' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:incheckout' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:inconnection' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:inretrieve_connection' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:inretrieve_connection' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:inconnection' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:inconnection' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/has_and_belongs_to_many_association.rb:98:inconstruct_sql' -
James Drucza
We are also experiencing the same issue, also intermittently (but this is not necessarily surprising since it seems to be a threading related issue).
Other details:
rails 2.3.5
jruby 1.4.0
tomcat 6It occurs when explicitly calling SomeActiveRecordModel.connection where SomeActiveRecordModel is a model in our app that extends ActiveRecord.
Stacktrace snippet:
W, [2010-03-12T02:27:55.307000 #515 Make plugin generator consistent with gemplugins] WARN -- : file:/var/lib/tomcat6/webapps/ROOT/WEB-INF/lib/jruby-complete-1.4.0.jar!/META-INF/jruby.home/lib/ruby/1.8/monitor.rb:278:inmon_check_owner'<br/> file:/var/lib/tomcat6/webapps/ROOT/WEB-INF/lib/jruby-complete-1.4.0.jar!/META-INF/jruby.home/lib/ruby/1.8/monitor.rb:224:inmon_exit'
file:/var/lib/tomcat6/webapps/ROOT/WEB-INF/lib/jruby-complete-1.4.0.jar!/META-INF/jruby.home/lib/ruby/1.8/monitor.rb:242:inmon_synchronize'<br/> /var/lib/tomcat6/webapps/ROOT/WEB-INF/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:incheckout' /var/lib/tomcat6/webapps/ROOT/WEB-INF/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:inconnection' /var/lib/tomcat6/webapps/ROOT/WEB-INF/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:inretrieve_connection' /var/lib/tomcat6/webapps/ROOT/WEB-INF/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:inretrieve_connection' /var/lib/tomcat6/webapps/ROOT/WEB-INF/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:inconnection' -
Santiago Pastorino
- State changed from new to open
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale