While I dont know if this would help, but faced with a similar situation, I might try something on the following lines: 1. write a small script that uses SOAP:Lite (may be copy hibye.cgi from http://guide.soaplite.com/) 2. setup htttpd.conf to use Apache::Status 3. Run apache in single-process mode (httpd -X) 4. run the test script i wrote 5. see what apache status has to say.
if memory usage looked ok we can add some more code and retry, and we might be able to figure out where the problem is. http://perl.apache.org/docs/1.0/guide/performance.html#Measuring_the_Memory_Usage_of_Subroutines On 3/30/07, Georg Grabler <[EMAIL PROTECTED]> wrote:
Hello list, I'm developing a quite large project, using SOAP::Lite and some more modules using mod_perl. My main problem is: Memory Usage. Currently, the apache processes take (each) about 150 MB memory, what's quite a lot. Now, i've been wondering which module and why it takes that much memory at all. Usually, the code should not be leaking. What's done is basically simple, connecting to Oracle DBs, fetching data and returning it using SOAP::Lite Data objects. My understanding (perl memory handling, garbage collection) is, that objects are destroyed as soon as functions are finished. How about this in mod_perl? It seems as if a lot of unnecessary things are cached. I can't just measure how much memory is used and restart the processes using several modules, since that would definitely result in a runtime performance problem. So, i did read over the documents measuring apache memory usage and similar, but couldn't realy figure out how to measure which functions keep all this memory. Are the SOAP::Data objects destroyed? I don't really know, though, there never are 150MB data transferred (max about 10 MB), so i don't really know where all this MBs come from. Initially, the apache processes take 42 MB each (i think this should be mostly shared memory and a lot of preloaded projects, as usual on a developer machine). If i connect using SOAP, the process jumps up to 140-150MB, and i just can't think of why this occurs. Do you have any advice, how to measure functions and / data which is kept? Or generally what takes that much memory? I definitely don't need to keep this data, since it would always change (per-request). Thank you, Georg