#37 Memory Leak

0.60
closed-fixed
Misc/Other (17)
7
2007-10-08
2004-01-29
No

We have a general problem using SOAP::Lite on Sun
Solaris 5.8 with Apache 1.3.28, mod_perl 1.26, and Perl
5.005_03. After being initiated, our Apache process has
a size of about 20 Megabytes. While processing SOAP-
requests, the size of the process is constantly growing.
We have seen process sizes of 90 MB or more
before our system comes into trouble (paging and
crashing).

The returned SOAP document size varies (up to 1 MB
and more).

We tested with a simple sample and dumped the process
after nn completed requests. After 1 invocation we
found 26 full copies of our 1 MB message. After 3
invocations we found more than 50 full copies.
Seems to grow further ...

We have tested this with versions 0.51, 0.55 and 0.60
of SOAP::Lite all with the same effect.

Since Memory is a critical factor and we need numerous
instances of these processes this unpredictable growing
size is a big problem for us.

Even when controlled via MaxRequestsPerChild and
GTopLimit::MAX_PROCESS_UNSHARED_SIZE, it is very
difficult for us to configure a stable running balanced
system

If you would like to test for yourselves:
The following source snipped of our sample returns only
a short message. The attached Member contains the
equivalent source with a return message of 1 Million
Bytes, all 'A's.

Do you have any suggestions for us how to solve our
problem ?

Help would be strongly appreciated.
Thanks in advance.

Sincerely yours Stefan Beierer
mailto:stefan.beierer@bgs-ag.de

-----------------------------------------------
package prodserver,

use strict;

sub login {
return "AAAAAAAAAA
AAAAAAAAAA"; # one million As !
}
1;

Discussion

  • sydd

    sydd - 2005-02-25

    Logged In: YES
    user_id=1227132

    We're having a similar problem in the Win32 environment
    using Perl 5.8.0 and the
    SOAP::Transport::HTTP::Daemon::ForkOnAccept
    example provided with release 0.55. After a while a message pops
    up on the PC indicating it's running out of virtual memory.
    Stop and
    start the server and it's ok again, for a while... The
    server was hit
    for a couple hundred byte long responses by 2 separate clients
    in 30 second loops. We need it to run 24 hours a day and
    potentially
    serve half a dozen clients every 30 seconds or so.

     
  • John43

    John43 - 2005-12-13

    Logged In: YES
    user_id=335409

    We're seeing this occur on Linux as well. Our service sends
    a 5 MB file as type base64Binary. The Apache process jumps
    from 31 MB of memory to 370 MB of memory. It takes only a
    few of these hits to cripple the system.

    SOAP::Lite 0.60
    Linux 2.6x
    Apache 1.3x
    mod_perl 1.x

     
  • Martin Kutter

    Martin Kutter - 2007-10-02
    • priority: 5 --> 7
    • assigned_to: byrnereese --> kutterma
     
  • Martin Kutter

    Martin Kutter - 2007-10-02

    Logged In: YES
    user_id=884175
    Originator: NO

    1702086 suggests there are circular references in SOAP::Data.

    Should be checked & fixed.

     
  • Martin Kutter

    Martin Kutter - 2007-10-08

    Logged In: YES
    user_id=884175
    Originator: NO

    Fixed in CVS in 1.50.

    Memory leak was caused by the soap object holding a reference back on the result which was never used, but prevented destruction of both
    the result and the soap object.
    Thanks to Devel::Cycle for making it easy to find circular references !

     
  • Martin Kutter

    Martin Kutter - 2007-10-08
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks