简体   繁体   中英

Heroku gunicorn timeouts

I have a python dash application that performs sentiment analysis on a string of text and displays the results of that analysis on a dashboard using Plotly and Dash. I am noticing when I look at the logs of my Heroku application that my workers are timing out when I am trying to perform sentiment analysis. I looked at heroku documentation and the max you can set the gunicorn's timeout is 30 seconds. My analysis takes longer than 30 seconds since its pulling data from a dynamodb table, preprocessing/cleaning the data, and then performing sentiment analysis using nltk. Is there a solution to extend the timeout for Heroku?

According to the documentation , it is not possible to extend the timeout on Heroku. If your request takes more than 30 seconds, you should move the work to a background task or worker.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM