Search code examples
herokupassengersidekiq

Passenger startup failure on Heroku Cache Control


I am receiving a startup error for two of my projects when deploying to Heroku. Both work fine locally, it seems like the worker startup of sidekiq causes problems for passenger. I don't really understand where the problem could come from and have checked my procfile, my sidekiq conf and other elements. Any input would be much appreciated.

Nov 03 01:25:15 zugone-production app/web.1:  [ 2015-11-03 09:25:14.9294 67/7fd6fe14d700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /app: An error occured while starting up the preloader. 
Nov 03 01:25:15 zugone-production app/web.1:    Error ID: 1a5af3e4 
Nov 03 01:25:15 zugone-production app/web.1:    Error details saved to: /tmp/passenger-error-UjpmyP.html 
Nov 03 01:25:15 zugone-production app/web.1:    Message from application: /app/vendor/bundle/ruby/2.0.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater/serve_zipped_assets.rb:15: syntax error, unexpected ':', expecting => 
Nov 03 01:25:15 zugone-production app/web.1:  ...= { headers: { 'Cache-Control': cache_control } } if Rails::... 
Nov 03 01:25:15 zugone-production app/web.1:  ...                               ^ (SyntaxError) 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater/railtie.rb:3:in `<top (required)>' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater.rb:1:in `<top (required)>' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/config/application.rb:9:in `<top (required)>' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/config/environment.rb:2:in `require' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/config/environment.rb:2:in `<top (required)>' 
Nov 03 01:25:15 zugone-production app/web.1:    config.ru:3:in `require' 
Nov 03 01:25:15 zugone-production app/web.1:    config.ru:3:in `block in <main>' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize' 
Nov 03 01:25:15 zugone-production app/web.1:    config.ru:1:in `new' 
Nov 03 01:25:15 zugone-production app/web.1:    config.ru:1:in `<main>' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:110:in `eval' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:110:in `preload_app' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:156:in `<module:App>' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>' 
Nov 03 01:25:15 zugone-production app/web.1:    /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:29:in `<main>' 
Nov 03 01:25:15 zugone-production app/web.1:  [ 2015-11-03 09:25:14.9793 67/7fd6dbfff700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 3-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error. 
Nov 03 01:25:15 zugone-production app/web.1:  [ 2015-11-03 09:25:14.9801 67/7fd6f6ffe700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error. 
Nov 03 01:25:15 zugone-production app/web.1:  [ 2015-11-03 09:25:14.9803 67/7fd6f5ffd700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 2-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error. 
Nov 03 01:25:15 zugone-production app/web.1:  [ 2015-11-03 09:25:14.9806 67/7fd6c3fff700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 6-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error. 
Nov 03 01:25:15 zugone-production app/web.1:  [ 2015-11-03 09:25:14.9807 67/7fd6c1ffd700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 8-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error. 
Nov 03 01:25:15 zugone-production app/web.1:  [ 2015-11-03 09:25:14.9809 67/7fd6c2ffe700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 7-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error. 
Nov 03 01:25:15 zugone-production app/web.1:  [ 2015-11-03 09:25:14.9811 67/7fd6daffe700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 4-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error. 
Nov 03 01:25:15 zugone-production app/web.1:  [ 2015-11-03 09:25:14.9812 67/7fd6d9ffd700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 5-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error. 
Nov 03 01:25:16 zugone-production heroku/router:  at=info method=GET path="/" host=www.zug-erstattung.de request_id=39412581-e55c-4e29-8730-c4c1694b660b fwd="172.21.225.211,130.238.98.89" dyno=web.1 connect=1ms service=5903ms status=500 bytes=2847 
Nov 03 01:25:16 zugone-production app/worker.1:  /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require': /app/vendor/bundle/ruby/2.0.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater/serve_zipped_assets.rb:15: syntax error, unexpected ':', expecting => (SyntaxError) 
Nov 03 01:25:16 zugone-production app/worker.1:  ...= { headers: { 'Cache-Control': cache_control } } if Rails::... 
Nov 03 01:25:16 zugone-production app/worker.1:  ...                               ^ 

Solution

  • I had same problem as following 1 hour ago.

    SyntaxError: /app/vendor/bundle/ruby/2.1.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater/serve_zipped_assets.rb:15: syntax error, unexpected ':', expecting => ...= { headers: { 'Cache-Control': cache_control } } if Rails::...

    It seems that heroku-deflater was updated 21 hours ago. Though I don't know the reason this error is caused at all, I was able to make my apps work well on Heroku by define heroku-deflater version on Gemfile like this.

    ■ Gemfile

    gem 'heroku-deflater', '0.5.3 ', :group => :production

    I would like to wait that heroku-deflater will be updated again.

    Thank you!