Home > other >  Heroku Django Gunicorn Error H18 (Request Interrupted) errors
Heroku Django Gunicorn Error H18 (Request Interrupted) errors

Time:06-02

I'm using Django with Gunicorn on heroku. And I make https requests via post to my backend sending some files (which don't need to be stored), locally everything works fine. But on heroku when I send small files (<13kbytes) it works, but for larger files I get

Error H18 (Request Interrupted).

I couldn't understand the reason for the error, if it's from heroku itself, if it's from the body of the request to be large or from gunicorn.

What would be the best way to find out the possible cause of this, any ideas?

CodePudding user response:

Here's a clue:

An H18 signifies that the socket connected, some data was sent as part of a response by the app, but then the socket was destroyed without completing the response

You might have experienced one of the limitations on heroku if you're a free user. However, it's best to pinpoint the issue instead of speculating. What you can do is install the Heroku CLI. Then, after you setup your account, send another large file on your backend. This will return the H18 error again. You can then trace the issue in your terminal with this:

$ heroku login
$ heroku logs --tail --app <your-heroku-app-name>

CodePudding user response:

For people in the future with the same problem, me problem came of i dont wait all file be uploaded, locally works cause instantally files uploaded, but in server not is instantally. So to solve my problem i needed use await and promisses to wait the files and after that e call the backend.

  • Related