R

Railway

βœ‹ο½œhelp

Join Server

[CRITICAL] WORKER TIMEOUT (pid:155)

Ppierrec5/17/2023
I'm running a python flask app on Railway. My app uses python's langchain library to interact with the openai api. Requests are long, and I get the following error consistently: [CRITICAL] WORKER TIMEOUT (pid:155)

is there anyway to extend the timeout period?
Ppierrec5/17/2023
N/A
Bbrody5/17/2023
default timeout is 30s do your requests take longer than that?
Ppierrec5/17/2023
Yes, OpenAI is slow when handling bigger requests
Bbrody5/17/2023
okay what is your start command?
Ppierrec5/17/2023
i have none
Ppierrec5/17/2023
(new to railway - that's my first project)
Bbrody5/17/2023
Procfile?
Ppierrec5/17/2023
looking into it. The documentation isn't very extensive on the topic though
Bbrody5/17/2023
the procfile would be in your project
Bbrody5/17/2023
as a file
Ppierrec5/17/2023
oh ok
Bbrody5/17/2023
send it please
Ppierrec5/17/2023
yep got it. it's got this: web: gunicorn main:app
Ppierrec5/17/2023
Bbrody5/17/2023
change the file contents to
web: gunicorn --timeout 300 main:app
Ppierrec5/17/2023
oh nice
Ppierrec5/17/2023
I'll do this now and let you know
Ppierrec5/17/2023
so far seems very stable! πŸ™‚
Ppierrec5/17/2023
If ever sthg changes I will let you know but thanks a lot !
Bbrody5/17/2023
no problem!
Ttherock6/8/2023
Worked for me too. Thanks Brody