I do experience 502 "Bad Gateway" messages on my Apache 2.4.29 live system, according to the log after HEAD requests. Often it is directly after a HEAD request, sometimes there are some other requests in between, but usually when a 502 occurs at most 5 seconds before was a HEAD requests. I'm running a Ruby on Rails 2.3.18 LTS with Passenger 6.02.

I could not find a connection between similar reports here and my case.

App 12199 output: [ 2019-05-18 18:02:22.8965 12199/0x0000556095c0d640(Worker 1) utils.rb ]: *** Exception ThreadError in Rack application object (deadlock; recursive locking) (process 12199, thread 0x0000556095c0d640(Worker 1)):
[ W 2019-05-18 18:02:22.8967 11573/Tc age/Cor/Con/InternalUtils.cpp:96 ]: [Client 3-6220] Sending 502 response: application did not send a complete response
App 12199 output:   from */.rvm/gems/ruby-2.5.5/gems/rack-1.4.7/lib/rack/lock.rb:14:in `lock'
App 12199 output:   from */.rvm/gems/ruby-2.5.5/gems/rack-1.4.7/lib/rack/lock.rb:14:in `call'
App 12199 output:   from */.rvm/gems/ruby-2.5.5/gems/rack-policy-0.4.1/lib/rack/policy/cookie_limiter.rb:44:in `call!'
App 12199 output:   from */.rvm/gems/ruby-2.5.5/gems/rack-policy-0.4.1/lib/rack/policy/cookie_limiter.rb:37:in `call'
App 12199 output:   from */.rvm/gems/ruby-2.5.5/bundler/gems/rails-54349061beff/actionpack/lib/action_controller/dispatcher.rb:106:in `call'
App 12199 output:   from */.rvm/gems/ruby-2.5.5/gems/passenger-6.0.2/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
App 12199 output:   from */.rvm/gems/ruby-2.5.5/gems/passenger-6.0.2/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:157:in `accept_and_process_next_request'
App 12199 output:   from */.rvm/gems/ruby-2.5.5/gems/passenger-6.0.2/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
App 12199 output:   from */.rvm/gems/ruby-2.5.5/gems/passenger-6.0.2/src/ruby_supportlib/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
App 12199 output:   from */.rvm/gems/ruby-2.5.5/gems/passenger-6.0.2/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'

0 Answers