Hey everyone :slightly_smiling_face: I'm trying to...
# ask-for-help
s
Hey everyone 🙂 I'm trying to utilize the timeout functionality and seen some interesting behavioure: I'm using:
Copy code
@bentoml.service(
    traffic={"timeout": 10, "workers": 1},
)
then
Copy code
@bentoml.api
    def test(self):
        time.sleep(30)
        print("Hello")
        return
I'm getting indeed a timeout after 10 seconds, but then in the server itself looks like the process is still running and after 30 seconds I see the "Hello", Anyone knows why that happens / how can I kill the process in the case of timeout? Using bentoml 1.4.10 Thanks!
j
Hello, is there a use case similar to this where you need to kill the process? can you describe your use case?
s
Yes I have an AI pipeline that uses modules created with bentoml This pipeline has consumers that injest jobs from a queue and passes them on to the AI module (bentoml server) with an http request There is a timeout set, and we encountered the same issue - after the timeout the bento server throws the timeout but the process in the bentoml service keeps going. The consumer that talks with the bento server gets the timeout and the job is marked "done" with a failure, and then keeps getting other jobs, but the bento server is busy, so now the consumer waits and we get more timeouts etc
We want to prioritize nee jobs instead of waiting for longer jobs