#Long Request Railway Timeout Errors

31 messages · Page 1 of 1 (latest)

tropic jolt
#

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

ornate dewBOT
#

Project ID: ca46f8f8-8b65-411c-8ef6-2d2607bceadd

trim oreBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

tropic jolt
#

ca46f8f8-8b65-411c-8ef6-2d2607bceadd

tranquil granite
#

python manage.py makemigrations && python manage.py migrate
this would not be your full start command, please provide your full start command

tropic jolt
#

Ohhh you're right haha I was wrong:

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

tranquil granite
#

the default timeout is 30s, should your requets even be taking that long?

tropic jolt
#

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

tranquil granite
#

okay

python manage.py migrate && gunicorn config.wsgi --timeout 600

600 seconds = 10 minutes

tropic jolt
#

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

tranquil granite
#

haha no clue, im not a python dev

tropic jolt
#

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)

tranquil granite
#

the timeout came from gunicorn, a single request exceeded the default 30s timeout so it was killed

tropic jolt
#

Ahhh it's an http server

tranquil granite
#

more or less yeah