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


Groups > comp.lang.python > #101387

Re: debugging uwsgi

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Robin Becker <robin@reportlab.com>
Newsgroups comp.lang.python
Subject Re: debugging uwsgi
Date Fri, 8 Jan 2016 16:49:34 +0000
Lines 33
Message-ID <mailman.75.1452271772.2305.python-list@python.org> (permalink)
References <568FCFBB.2080403@chamonix.reportlab.co.uk>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de yDO+LJkbz87v+WNwoJEDWASffaCnjtLrwdJEOhek/erQ==
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'debug': 0.04; 'django.': 0.05; 'importerror:': 0.05; 'startup': 0.05; '40,': 0.09; 'name)': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'bug': 0.10; 'python': 0.10; 'python.': 0.11; 'question.': 0.13; 'django': 0.13; '105,': 0.16; '33,': 0.16; '37,': 0.16; 'manage.py': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'runserver': 0.16; 'wrote:': 0.16; 'basically': 0.18; 'skip:" 40': 0.20; 'seems': 0.23; '(most': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'header:User-Agent:1': 0.26; 'command': 0.26; 'header:X-Complaints-To:1': 0.26; 'skip:" 20': 0.26; 'error': 0.27; 'skip:i 40': 0.27; 'preceding': 0.29; 'sensible': 0.29; "i'm": 0.30; 'compared': 0.30; 'error.': 0.31; 'guess': 0.31; 'skip:_ 10': 0.32; 'traceback': 0.33; 'file': 0.34; 'server': 0.34; 'something': 0.35; 'but': 0.36; 'project': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'seem': 0.37; 'why': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'caused': 0.61; 'different': 0.63; 'unusual': 0.72; 'received:109': 0.75; 'trial': 0.81; 'discovered': 0.83; 'becker': 0.84
X-Injected-Via-Gmane http://gmane.org/
X-Gmane-NNTP-Posting-Host 109.174.168.73
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0
In-Reply-To <568FCFBB.2080403@chamonix.reportlab.co.uk>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:101387

Show key headers only | View raw


On 08/01/2016 15:03, Robin Becker wrote:
> 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
..........
I discovered by trial and error that a preceding call_command had caused a 
chdir; that seems to have deleterious effects on the uwsgi process in question.

I'm not sure why the flup server is superior, but I guess something must be 
different about the python startup used by uwsgi compared to python manage.py 
runfcgi.

I'm still interested to find out any sensible way to debug uwsgi + python.
-- 
Robin Becker

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


Thread

Re: debugging uwsgi Robin Becker <robin@reportlab.com> - 2016-01-08 16:49 +0000

csiph-web