Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #101378

debugging uwsgi

From Robin Becker <robin@reportlab.com>
Newsgroups comp.lang.python
Subject debugging uwsgi
Date 2016-01-08 15:03 +0000
Message-ID <mailman.71.1452265407.2305.python-list@python.org> (permalink)

Show all headers | View raw


I have an unusual bug in a large django project which has appeared when using 
nginx + uwsgi + django. The configuration nginx + flup + django or the django 
runserver don't seem to create the conditions for the error.

Basically I am seeing an error

> Traceback (most recent call last):
> File "./project/fundfacts/api.py", line 33, in refresh_data
> call_command('fe_data_load', month=period_id, datadir=upload_dir)
> File "/home/rptlab/website/quilter.reportlab.com/quilter_2/lib/python2.7/site-packages/django/core/management/__init__.py", line 105, in call_command
> command = load_command_class(app_name, name)
> File "/home/rptlab/website/quilter.reportlab.com/quilter_2/lib/python2.7/site-packages/django/core/management/__init__.py", line 40, in load_command_class
> module = import_module('%s.management.commands.%s' % (app_name, name))
> File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
> __import__(name)
> ImportError: No module named fe_data_load


some hack printouts along the error path seem to indicate that the import should 
be possible as executing

module = import_module('%s.management.commands.%s' % (app_name, 'fe_data_load'))

in the manage.py shell work fine and sys.path looks as expected.

The uwsgi worker process (I'm forking) is corrupted after (or  perhaps because 
of ) this error and causes previously working pages to fail; it looks like the 
python interpreter's gone wrong somehow.

Any good ways forward with debugging this sort of issue? I'm not sure how I 
would remotely debug this using winpdb.
-- 
Robin Becker

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

debugging uwsgi Robin Becker <robin@reportlab.com> - 2016-01-08 15:03 +0000

csiph-web