I've seen a few of these implementations, where the worker self-destructs usually after a set number of jobs. If you have problems with stability or running out of memory, this approach can certainly be a quick fix. If possible though, it would be good to get the workers running stable enough that they don't need to be restarted.