2

since my last deploy to the production server of my application I get a weird error which I cannot reproduce:

ERROR ThreadError: Attempt to unlock a mutex which is locked by another thread FATAL
» 11:01:11.996 2013-07-02 09:01:11.895493+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:20:in `unlock'
» 11:01:12.095 2013-07-02 09:01:11.989101+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:20:in `ensure in call'
» 11:01:12.194 2013-07-02 09:01:12.089815+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:21:in `call'
» 11:01:12.276 2013-07-02 09:01:12.182996+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:in `call'
» 11:01:12.372 2013-07-02 09:01:12.277529+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
» 11:01:12.482 2013-07-02 09:01:12.371598+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
» 11:01:12.565 2013-07-02 09:01:12.467375+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
» 11:01:12.651 2013-07-02 09:01:12.561334+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
» 11:01:12.752 2013-07-02 09:01:12.654779+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
» 11:01:12.850 2013-07-02 09:01:12.748562+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-timeout-0.0.4/lib/rack/timeout.rb:16:in `block in call'
» 11:01:12.942 2013-07-02 09:01:12.841536+00:00 app web.1 - - /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/timeout.rb:69:in `timeout'
» 11:01:13.044 2013-07-02 09:01:12.934504+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-timeout-0.0.4/lib/rack/timeout.rb:16:in `call'
» 11:01:13.146 2013-07-02 09:01:13.028302+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call'
» 11:01:13.221 2013-07-02 09:01:13.123097+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:223:in `call'
» 11:01:13.335 2013-07-02 09:01:13.219949+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
» 11:01:13.418 2013-07-02 09:01:13.316886+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/rack/log_tailer.rb:17:in `call'
» 11:01:13.518 2013-07-02 09:01:13.410892+00:00 app web.1 - - /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service'
» 11:01:13.602 2013-07-02 09:01:13.508204+00:00 app web.1 - - /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
» 11:01:13.699 2013-07-02 09:01:13.603374+00:00 app web.1 - - /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
» 11:01:13.799 2013-07-02 09:01:13.696575+00:00 app web.1 - - /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

I'm hosting on a single dyno on heroku. I'm running on Rails version Rails 3.2.13.

There was no concurrent task (rake task, rails console, ...) running on this dyno during the requests before.

Has anyone an idea what the problem could come from?

Thank you!

Regards!

Sebastian
  • 1,873
  • 4
  • 25
  • 57
  • 'since my last deploy to the production server' - OK, who has installed/updated what on the server :) – Martin James Jul 02 '13 at 10:28
  • I deployed the new version, of course. But I did not change anything what could cause this kind of errors. There has not been any update in the configuration concerning multithreading. I know, that it is really hard to help in such a case. But maybe someone has had a similar problem and already solved it. – Sebastian Jul 02 '13 at 16:47
  • Ok. We fixed this issue by migrating to another webserver (`unicorn`). – Sebastian Aug 15 '13 at 16:49

2 Answers2

2

Ok. We fixed this issue by migrating to another webserver (unicorn).

Sebastian
  • 1,873
  • 4
  • 25
  • 57
0

I had exactly the same problem. In my case the problem was that I was creating indexes on the database (MongoDB 2.4.9) and that blocked the whole database. As soon the index creation was done the error message disappeared again. Obviously this error message appears if something is blocking.

I guess this thread is related to this one: Page not working Attempt to unlock a mutex which is locked by another thread

Community
  • 1
  • 1
Robert Reiz
  • 4,243
  • 2
  • 30
  • 43