Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Debian Lenny Out of Memory errors.

by kc0dxf (Initiate)
on Jan 14, 2009 at 22:48 UTC ( [id://736402]=perlquestion: print w/replies, xml ) Need Help??

kc0dxf has asked for the wisdom of the Perl Monks concerning the following question:

I am having a problem with out of memory errors. I suspect that it must have something to do with the Debian Perl package or the latest Debian kernel for Lenny (which is 2.6.26). I have 4 servers which are doing the same thing. When I try to load a module via cpan, I get out of memory error. For example: cpan -i CPAN throws the error. I have tried using ulimit to increase memory. For example I did ulimt -d unlimited but this doesn't fix the problem. Any ideas on how to figure this out?

Replies are listed 'Best First'.
Re: Debian Lenny Out of Memory errors.
by moritz (Cardinal) on Jan 14, 2009 at 23:20 UTC
    So what's your memory limit? does cpan -i CPAN die immediately, or only after a while? How much memory does it actually use? (use top to find out).

    That said, it's usually a bad idea to try to update a module like CPAN that's installed via Debian's package manager (in this case it's even a core module...). If you absolutely need a newer version of a core module, you might be better off with installing a separate perl in /usr/local/.

      No doesn't die immediately. And it will throw out of memory regardless of the module I try to load. For example, doing cpan -i Lchown and I get this:
      CPAN: Storable loaded ok (v2.18)
      Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
      CPAN: Compress::Zlib loaded ok (v2.008)
      ............................................................................DONE
      Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
        Database was generated on Wed, 14 Jan 2009 13:26:54 GMT
      CPAN: HTTP::Date loaded ok (v5.810)
      ..............
        New CPAN.pm version (v1.9301) available.
        Currently running version is v1.9205
        You might want to try
          install CPAN
          reload cpan
        to both upgrade CPAN.pm and run the new version without leaving
        the current session.
      
      CPAN: Time::HiRes loaded ok (v1.9711)
      
      ..............................................................DONE
      CPAN: LWP::UserAgent loaded ok (v5.813)
      
      I would like to connect to one of the following sites to get 'modules/03modlist.data.gz':
      
       http://www.perl.org/CPAN/
       ftp://ftp.perl.org/pub/CPAN/
      
      Is it OK to try to connect to the Internet? yes
      Fetching with LWP:
        http://www.perl.org/CPAN/modules/03modlist.data.gz
      LWP failed with code500 messageCan't connect to www.perl.org:80 (connect: timeout)
      
      Trying with "/usr/bin/wget -O /root/.cpan/sources/modules/03modlist.data.tmp3185" to get
          http://www.perl.org/CPAN/modules/03modlist.data.gz
      --2009-01-14 17:30:22--  http://www.perl.org/CPAN/modules/03modlist.data.gz
      Resolving proxy.edm-inc.com... 10.10.1.1
      Connecting to proxy.edm-inc.com|10.10.1.1|:3128... connected.
      Proxy request sent, awaiting response... 301 Moved Permanently
      Location: http://www.cpan.org/modules/03modlist.data.gz following
      --2009-01-14 17:30:27--  http://www.cpan.org/modules/03modlist.data.gz
      Connecting to proxy.edm-inc.com|10.10.1.1|:3128... connected.
      Proxy request sent, awaiting response... 200 OK
      Length: 156955 (153K) text/plain
      Saving to: `/root/.cpan/sources/modules/03modlist.data.tmp3185'
      
      100%======================================================================> 156,955     --.-K/s   in 0.01s
      
      2009-01-14 17:30:27 (13.2 MB/s) - `/root/.cpan/sources/modules/03modlist.data.tmp3185' saved 156955/156955
      
      Going to read /root/.cpan/sources/modules/03modlist.data.gz
      Out of memory!
      
        Would you care to answer my other questions as well?

        So far I only see that it needs more memory than it has, but without seeing any numbers, it might use an entirely reasonable amount of memory, and your limits are just too strict. (Note the ulimit's -d is not the only possible memory restriction).

        Try running it without a memory limit, and see how much it uses at most.

Re: Debian Lenny Out of Memory errors.
by jaldhar (Vicar) on Jan 15, 2009 at 00:10 UTC

    I don't know if its Debian. The other day I ran into this exact problem with Strawberry Perl 5.10 on Windows XP, When installing modules with CPAN, I would get get an "out of memory" error typically during the modules' tests. The thing is it was intermittent and eventually I did get my modules installed successfully. As I consider Windows to be incomprehensible voodoo to be avoided in the best of situations, I didn't look into it further but this is just a data point for your consideration.

    --
    જલધર

Re: Debian Lenny Out of Memory errors.
by Anonymous Monk on Jan 15, 2009 at 05:48 UTC
    Try Carl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://736402]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-18 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found