Worker Timeout Error Sentence Transformer Flask API

Hello,
We have a Flask api that utilizes a sentence-transformer model (all-MiniLM-L6-v2) to match input (from the request) to a similar message in a csv file, and return that similar message. When we run our web service it takes forever for the request to be processed. We get WORKER TIMEOUT errors as well as [ERROR] Worker (pid:128) was sent SIGTERM! errors on the logs. We tried adding these arguments to the gunicorn command: --worker-connections=1000 --worker-class=gevent --workers=3 -t 1800 --keep-alive 1800 but nothing helps. Any advice? Thanks.

Hi there,

30 minutes is a pretty long time to wait for a response. It’s likely your request is stuck somewhere which you will need to debug further to see where exactly this is. Adding some debug logging could be a way to narrow this down.

Render’s proxy request timeout is 100 minutes, so you could bump the timeout up to this long, but I am likely not going to help. If you still having issues with hitting the timeout of Gunicorn can you please open a ticket directly with us from the Help menu in our dashboard? The issue is likely going to be something specific within your service.

Regards,

Keith
Render Support, UTC+10 :australia:

Hi,
Thanks for your response! We did test with a simple string response, which went fine. But as soon as we use a sentence-transformer to process the request, that’s when we have the timeout issue.

HI there,

It may be helpful if you open the ticket directly with us so we can look at your specific service having an issue. You can do this from the Help menu on our Dashboard.

Regards,

Keith
Render Support, UTC+10 :australia:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.