- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (12)
- 7.1.3.2 (38)
- 7.1.3.4 (0)
- What's this?
This middleware can be used to diagnose deadlocks in the autoload interlock.
To use it, insert it near the top of the middleware stack, using config/application.rb:
config.middleware.insert_before Rack::Sendfile, ActionDispatch::DebugLocks
After restarting the application and re-triggering the deadlock condition, the route /rails/locks will show a summary of all threads currently known to the interlock, which lock level they are holding or awaiting, and their current backtrace.
Generally a deadlock will be caused by the interlock conflicting with some other external lock or blocking I/O call. These cannot be automatically identified, but should be visible in the displayed backtraces.
NOTE: The formatting and content of this middleware’s output is intended for human consumption, and should be expected to change between releases.
This middleware exposes operational details of the server, with no access control. It should only be enabled when in use, and removed thereafter.