You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by "Kenny Leung (inside)" <ke...@pobox.com> on 2002/05/29 21:25:22 UTC
How to stop receiving requests?
Hi All.
My virgin posting to the list.
I have an xmlrpc server set up, and it receives big chunks of data via remote calls. Because the call handling is multithreaded, I can receive more calls than I can really handle. The memory usage goes up until I eventually run out of memory. How can I guard against this? Is there a way to get the server to serialize its requests instead of running them in parallel?
Thanks!
-Kenny
Re: How to stop receiving requests?
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Kenny Leung (inside) <ke...@pobox.com> writes:
> Hi All.
>
> My virgin posting to the list.
>
> I have an xmlrpc server set up, and it receives big chunks of data
> via remote calls. Because the call handling is multithreaded, I can
> receive more calls than I can really handle. The memory usage goes
> up until I eventually run out of memory. How can I guard against
> this? Is there a way to get the server to serialize its requests
> instead of running them in parallel?
Due to spec restrictions, the current XML-RPC implementation is not
optimized with regard to memory usage. I don't know of a way to
serialize the requests off hand, and wouldn't suggest doing so any
how. What you really want to do is introduce a throttling mechansim
which kicks in when you get close to maxing out your memory. One way
of doing this would be to allocate a block of memory when the server
starts up, and when an OutOfMemoryError is thrown, release that
pre-alloc'd block and start throttling.
Some code which does configurable throttling would be a nice
addition. The development list is the place to discussion such
changes.
- Dan
Re: How to stop receiving requests?
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Kenny Leung (inside) <ke...@pobox.com> writes:
> Hi All.
>
> My virgin posting to the list.
>
> I have an xmlrpc server set up, and it receives big chunks of data
> via remote calls. Because the call handling is multithreaded, I can
> receive more calls than I can really handle. The memory usage goes
> up until I eventually run out of memory. How can I guard against
> this? Is there a way to get the server to serialize its requests
> instead of running them in parallel?
Due to spec restrictions, the current XML-RPC implementation is not
optimized with regard to memory usage. I don't know of a way to
serialize the requests off hand, and wouldn't suggest doing so any
how. What you really want to do is introduce a throttling mechansim
which kicks in when you get close to maxing out your memory. One way
of doing this would be to allocate a block of memory when the server
starts up, and when an OutOfMemoryError is thrown, release that
pre-alloc'd block and start throttling.
Some code which does configurable throttling would be a nice
addition. The development list is the place to discussion such
changes.
- Dan