service-streamer icon indicating copy to clipboard operation
service-streamer copied to clipboard

Worker_timeout

Open MuhammadKhalid3975 opened this issue 3 years ago • 2 comments

why worker timeout is a not parameter to ThreadedStreamer, my Object detection model takes 5 seconds to do inference on image and I want to increase it

MuhammadKhalid3975 avatar Dec 30 '21 23:12 MuhammadKhalid3975

I've run into this problem as well. In case it helps someones, you can modify this timeout from the installation:

f=$(python -c 'import service_streamer as ss; print(ss.service_streamer.__file__)')
echo "$f"

# Modify variable `WORKER_TIMEOUT` from $f with the desired value
desired_value="60" # Modify this variable

cat "$f" | grep "^WORKER_TIMEOUT" # Current value

# Modify the file
sed -E -i "s/^WORKER_TIMEOUT = [0-9]+\$/WORKER_TIMEOUT = ${desired_value}/" "$f"

cgr71ii avatar Sep 18 '22 21:09 cgr71ii

you can do

import service_streamer
service_streamer.service_streamer.WORKER_TIMEOUT = 120

before importing the Streamer

raphael-sch avatar Mar 21 '23 11:03 raphael-sch