prophet icon indicating copy to clipboard operation
prophet copied to clipboard

Kill fbProphet process at will

Open asieroyan opened this issue 3 years ago • 1 comments

Hi,

I have a Flask server which receives some data and returns its forecast using fbProphet. For production deployment, I really need to set a timeout in order to prevent too large execution times and server crashes.

For this I tried several typical methods in Python, such as multiprocessing, threading, signals and some other libraries to set timeouts. All of them return the timeout message correctly, but the fbProphet process keeps running in the background and the server freezes constantly.

Is there a native way to kill all the processes of fbProphet or a suitable workaround for this issue?

asieroyan avatar Jun 14 '21 13:06 asieroyan

I have similar issue. I want to use SIGALARM to set timeout, but I cannot stop long fbProphet calculations. Furthermore I cannot stop process by TERM or INT, only by KILL. How to set timeout?

p-frolov avatar Jul 05 '22 11:07 p-frolov

Hi @p-frolov, @asieroyan ! Did you manage to solve this ? I am curious because I also have the same issue

tulbureandreit avatar Mar 07 '23 08:03 tulbureandreit

Hi @tulbureandreit, no I didn't. I know only one way is to start fbProphet separately and kill it from another process. But it's the ugly way for me. Actually I use Celery as task manager and I can set timeouts for tasks, but I wanted to add custom timeouts system via SIGALARM.

p-frolov avatar Mar 07 '23 13:03 p-frolov

Hi @tulbureandreit, I decided to make a previous analysis of the data trying to predict the time it would last to execute and filter the requests, but it's far from the solution was looking for. It still works pretty good.

asieroyan avatar Mar 14 '23 08:03 asieroyan