new apache thread == connection reset

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

new apache thread == connection reset

Michael Hrivnak-3
I am using pyamf 0.5.1 with django, deployed with apache and mod_wsgi on
python 2.5.5.  I am seeing that when running tests with pyamf's client, as
soon as a new apache process handles a request, I get:

"error: (104, 'Connection reset by peer')".

This is a problem, because we can normally expect that a properly configured
deployment of apache with mod_wsgi will recycle processes.

This product also support xml-rpc, and when using that protocol and its
client, it is able to switch from one apache process to another seamlessly.

Any thoughts on what we can do?  Is this a known issue in the pyamf client?

Thanks,
Michael

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: new apache process == connection reset

Michael Hrivnak-3
Oops, I blew it right there in the subject.  I meant to say "process", not
"thread".

Michael

On Thursday 27 May 2010 12:27:52 am Michael Hrivnak wrote:

> I am using pyamf 0.5.1 with django, deployed with apache and mod_wsgi on
> python 2.5.5.  I am seeing that when running tests with pyamf's client, as
> soon as a new apache process handles a request, I get:
>
> "error: (104, 'Connection reset by peer')".
>
> This is a problem, because we can normally expect that a properly
>  configured deployment of apache with mod_wsgi will recycle processes.
>
> This product also support xml-rpc, and when using that protocol and its
> client, it is able to switch from one apache process to another seamlessly.
>
> Any thoughts on what we can do?  Is this a known issue in the pyamf client?
>
> Thanks,
> Michael
>

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: new apache thread == connection reset

Nick Joyce
In reply to this post by Michael Hrivnak-3
On 27 May 2010, at 14:27, Michael Hrivnak wrote:

> I am using pyamf 0.5.1 with django, deployed with apache and mod_wsgi on
> python 2.5.5.  I am seeing that when running tests with pyamf's client, as
> soon as a new apache process handles a request, I get:
>
> "error: (104, 'Connection reset by peer')".
>
> This is a problem, because we can normally expect that a properly configured
> deployment of apache with mod_wsgi will recycle processes.
>
> This product also support xml-rpc, and when using that protocol and its
> client, it is able to switch from one apache process to another seamlessly.
>
> Any thoughts on what we can do?  Is this a known issue in the pyamf client?
>
> Thanks,
> Michael
> _______________________________________________
> PyAMF users mailing list - [hidden email]
> http://lists.pyamf.org/mailman/listinfo/users

So, using the PyAMF client from within Apache causes the process to consistently die? Wow that is pretty impressive!! Is there anything in the apache logs that point to a possible cause (segfault etc.)?

There are no known bugs for the client (just missing features - a lot of which are addressed in the upcoming 0.6 release).

Can you send me the code that you use for the client and I can run that locally and see I can see anything obvious.

Thanks!

Nick
_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: new apache thread == connection reset

Michael Hrivnak-3
Perhaps I should clarify.

We have a data service running on a web server with apache and mod_wsgi.  It
uses pyamf to expose an API.

Separately, we have a suite of tests that can be run against the api.  The
tests are written in python and use pyamf's client.

When any web client is talking to any web server, it is totally normal for the
process on the server to get recycled.  That process is killed by apache (or
whatever the web server is), and a new one is spawned.  This helps mitigate
the risk of things like memory leaks.  It is also totally normal for the
server to close the TCP connection if a timeout is reached or if a certain
number of requests have been served on that connection.  This is all usually
handled seamlessly between the client and server, but in my case, it is not.

Specifically, once MaxRequestsPerChild is reached with an apache process, the
next request gets handled by a new process, but the connection gets reset
before it can successfully respond.  It does not seem to matter what code is
running on either end.

Thanks,
Michael

On Thursday 27 May 2010 05:15:52 pm Nick Joyce wrote:

> On 27 May 2010, at 14:27, Michael Hrivnak wrote:
> > I am using pyamf 0.5.1 with django, deployed with apache and mod_wsgi on
> > python 2.5.5.  I am seeing that when running tests with pyamf's client,
> > as soon as a new apache process handles a request, I get:
> >
> > "error: (104, 'Connection reset by peer')".
> >
> > This is a problem, because we can normally expect that a properly
> > configured deployment of apache with mod_wsgi will recycle processes.
> >
> > This product also support xml-rpc, and when using that protocol and its
> > client, it is able to switch from one apache process to another
> > seamlessly.
> >
> > Any thoughts on what we can do?  Is this a known issue in the pyamf
> > client?
> >
> > Thanks,
> > Michael
> > _______________________________________________
> > PyAMF users mailing list - [hidden email]
> > http://lists.pyamf.org/mailman/listinfo/users
>
> So, using the PyAMF client from within Apache causes the process to
>  consistently die? Wow that is pretty impressive!! Is there anything in the
>  apache logs that point to a possible cause (segfault etc.)?
>
> There are no known bugs for the client (just missing features - a lot of
>  which are addressed in the upcoming 0.6 release).
>
> Can you send me the code that you use for the client and I can run that
>  locally and see I can see anything obvious.
>
> Thanks!
>
> Nick
> _______________________________________________
> PyAMF users mailing list - [hidden email]
> http://lists.pyamf.org/mailman/listinfo/users
>

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: new apache thread == connection reset

Nick Joyce
Thanks for the clarification.

It is an odd situation indeed, as you say the process recycling should be taken care of by Apache behind the scenes.

Without anything in the error logs, I am not sure how to help. If you take PyAMF out of the equation does the problem still persist?


On 28 May 2010, at 08:58, Michael Hrivnak wrote:

> Perhaps I should clarify.
>
> We have a data service running on a web server with apache and mod_wsgi.  It
> uses pyamf to expose an API.
>
> Separately, we have a suite of tests that can be run against the api.  The
> tests are written in python and use pyamf's client.
>
> When any web client is talking to any web server, it is totally normal for the
> process on the server to get recycled.  That process is killed by apache (or
> whatever the web server is), and a new one is spawned.  This helps mitigate
> the risk of things like memory leaks.  It is also totally normal for the
> server to close the TCP connection if a timeout is reached or if a certain
> number of requests have been served on that connection.  This is all usually
> handled seamlessly between the client and server, but in my case, it is not.
>
> Specifically, once MaxRequestsPerChild is reached with an apache process, the
> next request gets handled by a new process, but the connection gets reset
> before it can successfully respond.  It does not seem to matter what code is
> running on either end.
>
> Thanks,
> Michael
>
> On Thursday 27 May 2010 05:15:52 pm Nick Joyce wrote:
>> On 27 May 2010, at 14:27, Michael Hrivnak wrote:
>>> I am using pyamf 0.5.1 with django, deployed with apache and mod_wsgi on
>>> python 2.5.5.  I am seeing that when running tests with pyamf's client,
>>> as soon as a new apache process handles a request, I get:
>>>
>>> "error: (104, 'Connection reset by peer')".
>>>
>>> This is a problem, because we can normally expect that a properly
>>> configured deployment of apache with mod_wsgi will recycle processes.
>>>
>>> This product also support xml-rpc, and when using that protocol and its
>>> client, it is able to switch from one apache process to another
>>> seamlessly.
>>>
>>> Any thoughts on what we can do?  Is this a known issue in the pyamf
>>> client?
>>>
>>> Thanks,
>>> Michael
>>> _______________________________________________
>>> PyAMF users mailing list - [hidden email]
>>> http://lists.pyamf.org/mailman/listinfo/users
>>
>> So, using the PyAMF client from within Apache causes the process to
>> consistently die? Wow that is pretty impressive!! Is there anything in the
>> apache logs that point to a possible cause (segfault etc.)?
>>
>> There are no known bugs for the client (just missing features - a lot of
>> which are addressed in the upcoming 0.6 release).
>>
>> Can you send me the code that you use for the client and I can run that
>> locally and see I can see anything obvious.
>>
>> Thanks!
>>
>> Nick
>> _______________________________________________
>> PyAMF users mailing list - [hidden email]
>> http://lists.pyamf.org/mailman/listinfo/users
>>
> _______________________________________________
> PyAMF users mailing list - [hidden email]
> http://lists.pyamf.org/mailman/listinfo/users

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users