[uWSGI] Problem with multiple processes with httplib.HTTPConnection?

Alan Castro alanclic at gmail.com
Tue Nov 9 17:39:30 CET 2010


Roberto,

I'm still facing this problem.

Let me context my problem: I developed a Pylons application (which is
multithreaded, each request fires up a new thread) and is working fine
(deployed with uwsgi with one process). When I run it on a multiprocess with
uwsgi eveything goes out of control and I keep getting this Oracle error
TNS: Bad packet, which looks like problem with my sqlalchemy session object.

I know this runs a bit out of uwsgi context, but do you know how much uwsgi
multiprocess environment affects pylons multithreaded? In my head everything
should work fine.

Thanks

Alan

On Tue, Nov 9, 2010 at 10:35 AM, Alan Castro <alanclic at gmail.com> wrote:

> Roberto,
>
> There is no problem with this, i created a test with twitterapi and
> everythin worked fine. I think the problem is my database connection on the
> other end.
>
> Thanks
>
> Regards
>
> Alan
>
>
> On Mon, Nov 8, 2010 at 6:48 PM, Alan Castro <alanclic at gmail.com> wrote:
>
>> This only happens in multiprocessing mode and I have the same code in
>> production running without multiprocessor.
>>
>> One more thing to be added to the discussion is that I make 4 asynchronous
>> ajax calls to the webserver. And in production (without multiprocessor) I
>> always have +-300ms response times.
>>
>> This problem happens everytime I use this configuration with
>> httplib.HTTPConnection.
>>
>> I'll create a dummy application here to verify this
>>
>>
>> On Mon, Nov 8, 2010 at 6:01 PM, Roberto De Ioris <roberto at unbit.it>wrote:
>>
>>>
>>> > I have this:
>>> >
>>> > SIGPIPE: writing to a closed pipe/socket/fd (probably the client
>>> > disconnected) on request /artist/show/12553 !!!
>>> > write(): Broken pipe [pyutils.c line 101]
>>> >
>>>
>>>
>>> This is very strange, it could be that the timeout of your webserver is
>>> too low, but why it appears only in multiprocessing mode ?
>>>
>>> It makes no sense for me.
>>>
>>> The error is 100% reproducible ?
>>>
>>> The only thing that can lead to this kind of problems in pylons is having
>>> debug enabled, but a big warning during startup should get your
>>> attention.
>>>
>>>
>>> http://wiki.pylonshq.com/display/pylonscookbook/Production+deployment+using+mod_python
>>>
>>>
>>> --
>>> Roberto De Ioris
>>> http://unbit.it
>>> _______________________________________________
>>> uWSGI mailing list
>>> uWSGI at lists.unbit.it
>>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.unbit.it/pipermail/uwsgi/attachments/20101109/93d2e979/attachment.htm 


More information about the uWSGI mailing list