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

On a very long-standing shared host install, cpan now crashes hard with “Out of Memory!” all the way back to a shell-prompt on reload index.   Any ideas why?

(On another note, this site was also crashing with 505 Internal Errors.   Corruption of site-content and files is not a plausible concern here.   A Perl-upgrade by the hosting service is far more likely.   But, outright removal of the .cpan directory and of the local CPAN directory used by this site, with the aim of re-creating them, did not resolve the problem.

Replies are listed 'Best First'.
Re: cpan runs "out of memory" when doing "reload index". Suddenly. Why?
by Your Mother (Archbishop) on Jul 12, 2012 at 16:59 UTC

    Because cpan is a memory hog? This is a huge part of why cpanm was written and should definitely be preferred in shared hosting style set-ups, if not everywhere. I couldn't even run cpan on my shared hosting because its process/memory cop scripts would kill it 90% of the time.

      and should definitely be preferred in shared hosting style set-ups

      Because who cares about the module list anymore, right?

Re: cpan runs "out of memory" when doing "reload index". Suddenly. Why?
by daxim (Curate) on Jul 12, 2012 at 17:01 UTC
    Because the operating system kills the process due to lack of memory. As of now, cpan requires 363 MiB (virt)/298 MiB (res).
Re: cpan runs "out of memory" when doing "reload index". Suddenly. Why?
by Anonymous Monk on Jul 12, 2012 at 17:01 UTC
    because you're using default Storable cache instead of sqlite cache (CPAN::SQLite)? and you've got ulimits? and you're not using cpanp with CPANPLUS::Internals::Source::SQLite?
Re: cpan runs "out of memory" when doing "reload index". Suddenly. Why?
by locked_user sundialsvc4 (Abbot) on Jul 12, 2012 at 17:10 UTC

    Obviously, the Perl configuration changed considerably, and with shared-hosting this is beyond my control.   I installed and used cpanm successfully to resolve the problem.   But I am very surprised to see that the resident-set requirement of cpan is now so large that it would exceed the (understandably, small) limits of a shared hosting provider.

    (You don’t even get to install any other indexing module, AFAIK, because the first thing it wants to do is to load the index ... catch-22.)

    P.S.:   Post one minute, get three great replies in a matter of minutes.   Thanks.   It’s easy to forget what a really great resource this place is ... even if you hang around the water cooler all the time.   @>--+----