Long Request Railway Timeout Errors

Hey all! I have a Django REST Framework project that utilizes openai's chat completion code & I'm getting these errors from my backend (where DRF is hosted). The requests seem to be timing out, but I think they're timing out too early... I don't have a procfile, only user settings. How can I fix this to make the timeout longer? I don't have a Procfile, but my "run command" is python manage.py makemigrations && python manage.py migrate
No description
No description
14 Replies
Percy
Percy11mo ago
Project ID: ca46f8f8-8b65-411c-8ef6-2d2607bceadd
Zack Plauché
Zack Plauché11mo ago
ca46f8f8-8b65-411c-8ef6-2d2607bceadd
Brody
Brody11mo ago
python manage.py makemigrations && python manage.py migrate this would not be your full start command, please provide your full start command
Zack Plauché
Zack Plauché11mo ago
Ohhh you're right haha I was wrong:
python manage.py migrate && gunicorn config.wsgi
python manage.py migrate && gunicorn config.wsgi
Is there a way to make the timeout longer here? I'm not super familiar with wsgi or if there's something else that controls it
Brody
Brody11mo ago
the default timeout is 30s, should your requets even be taking that long?
Zack Plauché
Zack Plauché11mo ago
Sometimes I think so It's using openai chat completion Building stories it takes some time sometime technically it "shouldn't" take 30... but it does sometimes haha
Brody
Brody11mo ago
okay
python manage.py migrate && gunicorn config.wsgi --timeout 600
python manage.py migrate && gunicorn config.wsgi --timeout 600
600 seconds = 10 minutes
Zack Plauché
Zack Plauché11mo ago
wow! cool thanks 🙂 Oh btw, not sure if you'd know the answer, but what umbrella of software / hardware concept does timeouts & wsgi fall under? Is it server stuff? server development etc. I always feel lost when it comes to the hosting / production part & I'm trying to not feel so lost
Brody
Brody11mo ago
haha no clue, im not a python dev
Zack Plauché
Zack Plauché11mo ago
Gotcha 🤣 I think I meant outside of just Python I thought it had to do with servers & what not Even if not wsgi but like, idk, some some other thing that would cause a timeout error lol or the place it happens Is that server stuff? Like linux & what not (might be dumb questions 🤣 I don't know the wording)
Brody
Brody11mo ago
the timeout came from gunicorn, a single request exceeded the default 30s timeout so it was killed
Zack Plauché
Zack Plauché11mo ago
Ahhh it's an http server
Brody
Brody11mo ago
more or less yeah
Zack Plauché
Zack Plauché11mo ago
cool B)
Want results from more Discord servers?
Add your server