I have a heroku application running Rails 4.1.5 on Ruby 2.1.1.
The app involves a bit of media processing, and involves a javascript upload function using dropzone JS, to an action that saves the photo on Amazon S3 before later processing in a background job.
I'm having a really frustrating problem. Intermittently - and dependent on the speed of the internet connection - the Heroku Router is killing the upload action with a H15 (idle connection) status. I don't believe that the connection has really gone idle, as using the same internet connection, I can upload similar files to other sites.
This isn't related to the web dyno's timeout, as the request never hits the dyno in these cases where the router shuts it down first.
What could be happening here?
Note: I've implemented this CORS-handling technique: http://www.tsheffler.com/blog/?p=428
Logs:
[Timestamp] heroku[router]: at=error code=H15 desc="Idle connection" method=POST path="/console/breeds/57-YAMTALE/photos" host=[host] request_id=634d7680-8b66-4123-a4bc-fe78dc4e7b90 fwd="[IP]" dyno=web.1 connect=0ms service=90232ms status=503 bytes=0
Procfile:
web: bundle exec rails server thin -p \$PORT -e \$RACK_ENV
Gems that might be relevant:
gem 'thin'
gem 'carrierwave'
gem 'carrierwave_backgrounder'
gem 'rmagick', :require => 'RMagick'
gem 'aws-sdk'
gem 'rack-cors', :require => 'rack/cors'
gem 'daemons'
gem 'exception_notification'