[CRITICAL] WORKER TIMEOUT (pid:155)

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?
19 Replies
Percy
Percy•2y ago
Project ID: N/A
CierrePorbin
CierrePorbinOP•2y ago
N/A
Brody
Brody•2y ago
default timeout is 30s do your requests take longer than that?
CierrePorbin
CierrePorbinOP•2y ago
Yes, OpenAI is slow when handling bigger requests
Brody
Brody•2y ago
okay what is your start command?
CierrePorbin
CierrePorbinOP•2y ago
i have none
CierrePorbin
CierrePorbinOP•2y ago
(new to railway - that's my first project)
Brody
Brody•2y ago
Procfile?
CierrePorbin
CierrePorbinOP•2y ago
looking into it. The documentation isn't very extensive on the topic though
Brody
Brody•2y ago
the procfile would be in your project as a file
CierrePorbin
CierrePorbinOP•2y ago
oh ok
Brody
Brody•2y ago
send it please
CierrePorbin
CierrePorbinOP•2y ago
yep got it. it's got this: web: gunicorn main:app
Brody
Brody•2y ago
change the file contents to web: gunicorn --timeout 300 main:app
CierrePorbin
CierrePorbinOP•2y ago
oh nice I'll do this now and let you know so far seems very stable! 🙂 If ever sthg changes I will let you know but thanks a lot !
Brody
Brody•2y ago
no problem!
slicksammy
slicksammy•2y ago
Worked for me too. Thanks Brody
Osm
Osm•2y ago
thanks, it worked for me
Want results from more Discord servers?
Add your server