Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Debian Lenny Out of Memory errors.

by kc0dxf (Initiate)
on Jan 14, 2009 at 22:48 UTC ( #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)
      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 version (v1.9301) available.
        Currently running version is v1.9205
        You might want to try
          install CPAN
          reload cpan
        to both upgrade and run the new version without leaving
        the current session.
      CPAN: Time::HiRes loaded ok (v1.9711)
      CPAN: LWP::UserAgent loaded ok (v5.813)
      I would like to connect to one of the following sites to get 'modules/':
      Is it OK to try to connect to the Internet? yes
      Fetching with LWP:
      LWP failed with code500 messageCan't connect to (connect: timeout)
      Trying with "/usr/bin/wget -O /root/.cpan/sources/modules/" to get

      --2009-01-14 17:30:22--
      Connecting to||:3128... connected.
      Proxy request sent, awaiting response... 301 Moved Permanently
      Location: following
      --2009-01-14 17:30:27--
      Connecting to||:3128... connected.
      Proxy request sent, awaiting response... 200 OK
      Length: 156955 (153K) text/plain
      Saving to: `/root/.cpan/sources/modules/'
      100%======================================================================> 156,955     --.-K/s   in 0.01s
      2009-01-14 17:30:27 (13.2 MB/s) - `/root/.cpan/sources/modules/' saved 156955/156955
      Going to read /root/.cpan/sources/modules/
      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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://736402]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2018-03-17 21:11 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (226 votes). Check out past polls.