Open moshekaplan opened 4 years ago
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
No worries. I had been asking for instructions because hxtool.py:616 mentions gunicorn
and mod_wsgi
support.
Would it be possible to provide instructions for setting up hxtool with mod_wsgi or gunicorn?