Lots of H17 Heroku Errors

881 views Asked by At

I am working on a ruby project using sinatra, heroku, activerecord, and postgresql. I am consistantly getting this error:

2015-06-10T19:30:52.015492+00:00 heroku[router]: http_error="Invalid HTTP status line" at=error code=H17 desc="Poorly formatted HTTP response" method=POST path="/login" host=myapp.herokuapp.com request_id=e5c29131-1c22-47d7-84a4-b1b51e4a3905 fwd="74.71.233.85" dyno=web.1 connect=1ms service=135ms status=503 bytes=862

I cannot find out how to fix it. If anyone needs any more information to fix it, I would be happy to provide it.

2

There are 2 answers

2
thesecretmaster On BEST ANSWER

I solved my problem by just making some other irrelevant edits and pushing to heroku again which caused a dyno restart which is what I believe solved the problem. Now it works just fine. If anyone can come up with an explanation for this that would be much appreciated.

And if it could be added as an answer it would be accepted! I find this very weird.

0
John On

In my case this was happening with a POST request to which my dyno was not returning a response code. It was fixed by returning a valid response code, such as 200. For example:

post '/user/:user_id/favourites/:item_id' do

  [add the favourite, and if successful...]

  200

end