HXTool icon indicating copy to clipboard operation
HXTool copied to clipboard

Instructions for setting up with mod_wsgi or gunicorn?

Open moshekaplan opened this issue 5 years ago • 2 comments

Would it be possible to provide instructions for setting up hxtool with mod_wsgi or gunicorn?

moshekaplan avatar Sep 23 '20 02:09 moshekaplan

Hi @moshekaplan - Unfortunately, due to the way HXTool currently interacts with the scheduler and database objects (via singletons), leveraging gunicorn and mod_wsgi with multiple workers breaks the application. This is due to the overall challenges of IPC in Python - current implementations leverage pickle, and many objects in those classes cannot be pickled. Though you could potentially run HXTool in gunicorn with a single worker, but that wouldn't give you any more benefit than leveraging Flask's internal web server.

That said, I have it on my bucket list to convert both scheduler and the database classes to some form of remoting so that they can run within their own processes. Once this is done, HXTool should run just fine under gunicorn or mod_wsgi.

Thanks, Elazar

B0fH avatar Sep 25 '20 19:09 B0fH

No worries. I had been asking for instructions because hxtool.py:616 mentions gunicorn and mod_wsgi support.

moshekaplan avatar Sep 25 '20 20:09 moshekaplan