Closed qur2 closed 11 years ago
the segfault has just been fixed: https://github.com/unbit/uwsgi/commit/f462792c8ef5aca0f6149e7e89d87f354cff9670
it now correctly reports 'broken apps'
By the way:
using strings for the callable lead to errors (as in your case), while using modules is safer (the python vm will report specific problems)
the 'uwsgi' module exists only into the uWSGI environment, so you cannot make 'import uwsgi' from a python shell.
be sire to understand how PYTHONPATH works, multiple interpreters are hard to master, expecially with django that makes use of environment variables (DJANGO_SETTINGS_MODULE)
This kind of approach is pretty old-fashioned, having different instances controlled by the Emperor is the blessed way. Regarding the scaling of processes you have the --cheaper option to have a dynamic number of workers (based on the load)
For example:
--processes 20 --cheaper 2
will start 2 processes and will "gently" raise upto 20 based on load
Thanks a lot for the quick fix and the explanation. I'll definitely have a look to emperor. I have to deal with a pretty awkward django project and I'm trying to find ways to make dev lives easier.
Here is a toy setup that brought me to a segfault. I probably do something wrong, but I was asked on twitter to report this so here is the story:
I'm trying to run django instances in a multiapp setup, in order to not have to decide how many workers per instance (is that a correct assumption?). I followed the tutorial at https://uwsgi-docs.readthedocs.org/en/latest/Python.html?highlight=applications but this just didn't work, because there is no such a uwsgi python module (I did installed it using pip). So I did things my way, with my current understanding of how it works:
master.py:
And here comes the segfault: