error: stream timeout
sydodng
HOBBYOP

2 years ago

My app usually encounters the error stream timeout.
This is the latest lines in the railway logs:

[2024-05-13 02:18:49 +0000] [144] [INFO] Starting gunicorn 20.1.0
[2024-05-13 02:18:49 +0000] [144] [INFO] Listening at: http://0.0.0.0:8000 (144)
[2024-05-13 02:18:49 +0000] [144] [INFO] Using worker: sync
[2024-05-13 02:18:49 +0000] [146] [INFO] Booting worker with pid: 146

Please help me to resolve this. Thank you!

21 Replies

2 years ago

What's your current start command?


sydodng
HOBBYOP

2 years ago

"startCommand": "/bin/sh -c \"sh deploy_script.sh && python manage.py collectstatic --noinput && gunicorn mysite.wsgi --timeout 3000\"


2 years ago

The error you are getting, is that just a plain text error when making a request to your service?


sydodng
HOBBYOP

2 years ago

No. When I click on a URL on my app, the app becomes unresponsive and after a while shows a stream timeout message.
I have to restart the app to be able to access it again


2 years ago

You meant to answer yes to my question.

Has your service ever worked before or is this an error you are getting recently?


sydodng
HOBBYOP

2 years ago

This happened about 15 days ago


2 years ago

So you are able to restore access when this happens by restarting the service?


sydodng
HOBBYOP

2 years ago

yes. This often happens after I deploy new code


2 years ago

How long after deploying new code would you get this error.


sydodng
HOBBYOP

2 years ago

about 1 min after deploying new code


2 years ago

Does it work as intended up until that minute mark?


sydodng
HOBBYOP

2 years ago

sure


2 years ago

Its more of a yes or no type of question, I'm sorry but "sure" doesn't answer the question sufficiently.

Does your deployment work as intended up until that minute mark?


sydodng
HOBBYOP

2 years ago

yes


2 years ago

How long will the deployment work for after you do a restart?


sydodng
HOBBYOP

2 years ago

about 2 min and now after rebooting, my application cannot be accessed.


2 years ago

my application cannot be accessed.

I'm sorry but that doesn't provide enough information.


sydodng
HOBBYOP

2 years ago

What information do you need?


2 years ago

Please go into more details.


tuanle0810
TRIAL

2 years ago

Here is screenshot error log:

Attachments


2 years ago

There's no errors there.

From the information you have provided all signs are currently pointing to an issue with your app / code / config itself, as seems to be exiting, softlocking, or crashing.

Are there any errors in the logs or do your metrics look strange?


Loading...