[uWSGI] uwsgictl

2017-12-19 Thread Etienne Robillard
: % uwsgictl [start|stop|restart] It would also be nice to have a interactive Python shell by simply typing : % uwsgictl Entering interactive Python shell... >>> What do you think? Etienne -- Etienne Robillard tkad...@yandex.com https://www.isotopeso

Re: [uWSGI] uwsgi 2.0.15 doesnt import paths from easy-install.pth

2017-11-11 Thread Etienne Robillard
I found the problem. I had multiple python interpreters installed on my production site. Setting the variable PYTHONHOME=/usr corrected the issue. Sorry for the noise. Etienne Le 2017-11-11 à 17:12, Etienne Robillard a écrit : Hi Roberto, In production mode I have an issue to import

[uWSGI] uwsgi 2.0.15 doesnt import paths from easy-install.pth

2017-11-11 Thread Etienne Robillard
the package(s) with pip, however this is a true PITA... Can someone please investigate this issue ? I don't experience this problem in development mode however. TIA, Etienne -- Etienne Robillard tkad...@yandex.com http://www.isotopesoftware.ca

Re: [uWSGI] uwsgi stats middleware for Django

2017-12-08 Thread Etienne Robillard
Hi Jay, On 07/12/17 12:28 PM, Jay Wineinger wrote: I believe this means that the uwsgi module is only available for import to the python interpreter embedded by uwsgi. Fair enough. I'm not going to use that module anyway. Could someone tell me if this code is appropriate to get the total

[uWSGI] uwsgi stats middleware for Django

2017-12-07 Thread Etienne Robillard
in a standard Django view: def someview(request):     # retrieve the number of active requests (connections)     connections = request.environ['uwsgi.requests'] What do you think? Etienne -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca

Re: [uWSGI] uwsgi stats middleware for Django

2017-12-07 Thread Etienne Robillard
ot;The uWSGI server automagically adds a |uwsgi| module into your Python apps." What does that mean exactly and how can I access the uwsgi module programmatically? Thanks, Etienne Le 2017-12-07 à 10:13, Etienne Robillard a écrit : Hi, I would like to access the uWSGI stats API from wi

[uWSGI] uwsgi/gevent segmentation fault

2017-12-06 Thread Etienne Robillard
Hi, I'm experiencing a segmentation fault when I try to run uwsgi with the gevent handler: % /usr/local/bin/uwsgi --reload-on-rss 200 --gevent 512 --socket localhost:8000 --wsgi-file $ROOTDIR/www-bin/dispatch.uwsgi --threads 2 --processes 4 --master --daemonize /var/log/uwsgi.log Here's

Re: [uWSGI] [Tutor] How to debug a memory leak in a wsgi application?

2017-12-06 Thread Etienne Robillard
handler. Etienne Le 2017-12-06 à 10:00, Alan Gauld via Tutor a écrit : On 06/12/17 09:21, Etienne Robillard wrote: Hi I think my wsgi application is leaking and I would like to debug it. What is the best way to profile memory usage in a running wsgi app? This is probably a bit advanced

[uWSGI] memory leak in django app?

2017-12-06 Thread Etienne Robillard
ut it does not appears to make any differences. Can you recommend any libraries to debug/profile memory allocation in Python 2.7 ? Is Django more memory efficient with --pymalloc or by using the default linux malloc() ? Thank you in advance, Etienne -- Etienne Robillard tkad...@yandex

Re: [uWSGI] memory leak in django app?

2017-12-06 Thread Etienne Robillard
Antonis Antonis Christofides http://djangodeployment.com On 2017-12-06 14:04, Etienne Robillard wrote: Hi all, I'm struggling to understand how django/python may allocate and unallocate memory when used with uWSGI. I have a Debian system running Python 2.7 and uwsgi with 2GB of RAM and 2 CPUs. I

Re: [uWSGI] uwsgictl

2017-12-21 Thread Etienne Robillard
in Python to get a custom Python interactive interpreter and the "uwsgi" module ? The uwsgi module is available only for code running into uWSGI itself so i do not think is a viable approach. Maybe a master plugin (to write in c/c++) with an ad-hoc protocol ? -- Etienne Robi

Re: [uWSGI] urgent - ValueError: call stack is not deep enough

2018-05-12 Thread Etienne Robillard
r/local/bin/uwsgi(uwsgi_init_worker_mount_apps+0) [0x4709a0] /usr/local/bin/uwsgi() [0x41e53e] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f8b43b7c830] /usr/local/bin/uwsgi(_start+0x29) [0x41e569] *** end of backtrace *** File "src/gevent/greenlet.py", line 247, in gevent._greenlet.Greenlet.__init__ File "src/gevent/greenlet.py", line 247, in gevent._greenlet.Greenlet.__init__ ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca/ ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] urgent - ValueError: call stack is not deep enough

2018-05-13 Thread Etienne Robillard
t;> wrote: >>> import gevent >>> print gevent.__version__ 1.3.0 >>> On Sun, May 13, 2018 at 5:17 AM, Etienne Robillard <tkad...@yandex.com <mailto:tkad...@yandex.com>> wrote: Which gevent version are you using? Etienne

Re: [uWSGI] uwsgictl

2017-12-24 Thread Etienne Robillard
write in c/c++) with an ad-hoc protocol ? -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca/ ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

[uWSGI] Building libuwsgi.py with cFFI

2017-12-24 Thread Etienne Robillard
help would be appreciated! Etienne -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca/ ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] gevent worker graceful reload during rush hour?

2017-12-25 Thread Etienne Robillard
e worker is not quite ready? Can we spawn a new worker and get ready first, then kill the old worker next? ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca/ ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] PyPy issue

2018-02-08 Thread Etienne Robillard
is: import os import django #from django.core.wsgi import get_wsgi_application from django.core.handlers.wsgi import WSGIHandler os.environ.setdefault("DJANGO_SETTINGS_MODULE", "benchmark.settings") django.setup() application = WSGIHandler() Any ideas why the environ objec

Re: [uWSGI] PyPy issue

2018-02-08 Thread Etienne Robillard
uwsgi var: QUERY_STRING = add uwsgi var: SERVER_PROTOCOL = HTTP/1.1 add uwsgi var: SCRIPT_NAME = add uwsgi var: SERVER_NAME = marina add uwsgi var: SERVER_PORT = 8000 add uwsgi var: REMOTE_ADDR = 127.0.0.1 I suspect uWSGI doesn't properly pick up magic nginx variables when using PyPy. Etie

Re: [uWSGI] PyPy issue

2018-02-09 Thread Etienne Robillard
socket=... with http-socket=... in the uwsgi config and uwsgi_pass with proxy_pass (with appropriate include ...) in the nginx conf? If you configure your uwsgi with cpython instead of pypy, does it work with similar configuration? -- Etienne Robillard tkad...@yandex.com https

Re: [uWSGI] [SECURITY] patch for potential stack bypassing

2018-02-06 Thread Etienne Robillard
, uWSGI will crash or will trigger a stack corruption exception) Albeit using it for some kind of useful attack seems very improbable, the new approach is way more robust than the previous one as it checks for the path size before calling realpath() too. -- Etienne Robillard tkad...@yandex.com

Re: [uWSGI] PyPy issue

2018-02-12 Thread Etienne Robillard
n dict. What do you think? Etienne Le 2018-02-09 à 06:40, Etienne Robillard a écrit : Hi, I confirm nginx is really sending the REQUEST_METHOD header with nginx/uwsgi: 04:33:37.008721 read(6, "\0\274\1\0\f\0QUERY_STRING\0\0\16\0REQUEST_METHOD\3\0GET\f\0CONTENT_TYPE\0\0\16\0CONTENT_LENGTH\0

Re: [uWSGI] PyPy issue

2018-02-09 Thread Etienne Robillard
e 2018-02-09 à 06:40, Etienne Robillard a écrit : Hi, I confirm nginx is really sending the REQUEST_METHOD header with nginx/uwsgi: 04:33:37.008721 read(6, "\0\274\1\0\f\0QUERY_STRING\0\0\16\0REQUEST_METHOD\3\0GET\f\0CONTENT_TYPE\0\0\16\0CONTENT_LENGTH\0\0\v\0REQUEST_URI\v\0/benchmark/\t\0P

Re: [uWSGI] PyPy issue

2018-02-09 Thread Etienne Robillard
home/erob/ncvs/django/django/template/base.py", line 849, in resolve     value = self._resolve_lookup(context)   File "/home/erob/ncvs/django/django/template/base.py", line 911, in _resolve_lookup     current = current()   File "/home/erob/ncvs/django/django/http/request.py", l

[uWSGI] PyPy issue

2018-02-08 Thread Etienne Robillard
Hi, I'm trying to run uWSGI 2.0.15 with PyPy 5.9 to bootstrap a native django app. Here's my uwsgi.ini : [uwsgi] chdir=/home/erob/src/django-hotsauce-0.9/tests/benchmarks/lib/pypy/django_sqlite module=benchmark.wsgi:application master=True pidfile=/tmp/uwsgi-master.pid vacuum=True

Re: [uWSGI] PyPy issue

2018-02-21 Thread Etienne Robillard
that working. That's a 32-bit system, isn't it? Looks like you got bit by this bug: https://github.com/unbit/uwsgi/issues/1129 On 9 February 2018 at 13:44, Etienne Robillard <tkad...@yandex.com> wrote: OK. I got a working patch: for i in range(0, iov.iov_len, 1): environ[ffi.string(ffi.cast

[uWSGI] can't pickle reader objects

2018-02-21 Thread Etienne Robillard
Hi, I'm having an issue with the shelve and pickle modules when using pypy 5.9 with uwsgi: + . /etc/djangorc + export PYTHONHOME=/usr/local/pypy + export ROOTDIR=/home/www/isotoperesearch.ca/trunk + export BINDIR=/home/www/isotoperesearch.ca/trunk/bin + export

Re: [uWSGI] another release almost ready

2018-02-25 Thread Etienne Robillard
/uwsgi/issues/1129 Hi, thanks, can you make a pull request ? -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca/ ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] Building libuwsgi module with cFFI

2017-12-26 Thread Etienne Robillard
Hey all, I really would like to use cFFI to build a embedded uWSGI application and library. Is there a way I could use the libuwsgi.so shared library with cFFI ? Regards, Etienne Le 2017-12-24 à 06:01, Etienne Robillard a écrit : Hi, I'm trying to build the libuwsgi.so shared library

Re: [uWSGI] Building libuwsgi module with cFFI

2017-12-27 Thread Etienne Robillard
:30, Armin Rigo a écrit : Hi Etienne, On 26 December 2017 at 11:04, Etienne Robillard <tkad...@yandex.com> wrote: ffi.cdef(open('uwsgi.h').read()) You cannot use a full unmodified C header in ``ffi.cdef()``. You have instead to use subsets of it, like only the functions you plan t

Re: [uWSGI] uwsgictl

2017-12-21 Thread Etienne Robillard
What do you think? Etienne -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca/ ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] uwsgictl

2017-12-20 Thread Etienne Robillard
really cool, maybe the master fifo could be a good start (extending it with new commands should be pretty easy): http://uwsgi-docs.readthedocs.io/en/latest/MasterFIFO.html -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca/ ___ uWSGI

Re: [uWSGI] another release almost ready

2018-02-26 Thread Etienne Robillard
Thanks Paul. I managed to create a pull request: https://github.com/unbit/uwsgi/pull/1751 Please let me know what you think. Etienne Le 2018-02-26 à 05:58, Paul J Stevens a écrit : On 25-02-18 19:18, Etienne Robillard wrote: I'm afraid I don't know how to make a pull requests. To create

Re: [uWSGI] ImportError: No module named site while starting the uwsgi

2018-04-10 Thread Etienne Robillard
te=%%a %%b %%d %%H:%%M:%%S How to resolve this issue? Thanks Manivel R ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi -- Etienne Robillard tkad...@yandex.com https://www.isotopes

Re: [uWSGI] another release almost ready

2018-02-25 Thread Etienne Robillard
https://github.com/unbit/uwsgi/issues/1129 Le 2018-02-25 à 12:35, Roberto De Ioris a écrit : Hi, 2.0.17 is about to be released, please report any patch that you want to be included. Thanks -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca