Gossamer Forum
Home : General : Perl Programming :

Out of Memory - mod_perl

Quote Reply
Out of Memory - mod_perl
Links SQL / mod_perl use attempt - Out Of Memory message

Stumped?? This is not a heavily used site. Anybody? Details below. Thanks in advance

John

-------------------------------------------------------



httpd.conf =>

PerlRequire /usr/local/etc/httpd/cgi-bin/startup.pl

<Location /usr/home/gatay/usr/local/etc/httpd/cgi-bin/links>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>


startup.pl =>

#!/usr/bin/perl
use lib '/usr/home/gatay/usr/local/etc/httpd/cgi-bin/links/admin';
use Links::mod_perl;
1;

This does work on command line

gatay% perl startup.pl
Preloading Links SQL scripts into mod_perl:
. . . . . .
All scripts compiled and loaded ok!


System Info =>

System Information
======================================
Perl Version: 5.00503
Links SQL Version: 2.1.0
Persistant Env: mod_perl (0) SpeedyCGI (0)
@INC =
/usr/home/gatay/usr/local/etc/httpd/cgi-bin/links/admin
/usr/local/lib/perl5/5.00503/i386-freebsd
/usr/local/lib/perl5/5.00503
/usr/local/lib/site_perl
/usr/local/lib/site_perl


-----------------------------------------------------------

Memory =>

Checked with host and have 20 MB "hard" limit and 14 MB "soft" limit of memory. Machine has 512 total.

-----------------------------------------

Preloading Links SQL scripts into mod_perl:
. . . Out of memory!
Callback called exit.
END failed--cleanup aborted at /dev/null line 87.
Callback called exit at /dev/null line 87.
END failed--cleanup aborted at /dev/null line 3.
Callback called exit at /dev/null line 3.
Preloading Links SQL scripts into mod_perl:
. . . Out of memory!
Callback called exit.
END failed--cleanup aborted at /dev/null line 87.
Callback called exit at /dev/null line 87.
END failed--cleanup aborted at /dev/null line 3.
Callback called exit at /dev/null line 3.
Preloading Links SQL scripts into mod_perl:
. . . Out of memory!
Callback called exit.
END failed--cleanup aborted at /dev/null line 87.
Callback called exit at /dev/null line 87.
END failed--cleanup aborted at /dev/null line 3.
Callback called exit at /dev/null line 3.
Preloading Links SQL scripts into mod_perl:
. . . Out of memory!
Callback called exit.
END failed--cleanup aborted at /dev/null line 87.
Callback called exit at /dev/null line 87.
END failed--cleanup aborted at /dev/null line 3.
Callback called exit at /dev/null line 3.
Preloading Links SQL scripts into mod_perl:
. . . Out of memory!
Callback called exit.
END failed--cleanup aborted at /dev/null line 87.
Callback called exit at /dev/null line 87.
END failed--cleanup aborted at /dev/null line 3.
Callback called exit at /dev/null line 3.
[Fri Jun 14 16:11:18 2002] [notice] Apache/1.3.22 OpenSSL/0.9.6c (Unix) PHP/4.1.2 mod_perl/1.21 configured -- resuming normal operations
[Fri Jun 14 16:11:18 2002] [notice] Accept mutex: flock (Default: flock)
-------------------------------------------------------------------------

Last edited by:

gatman: Jun 14, 2002, 4:37 PM
Quote Reply
Re: [gatman] Out of Memory - mod_perl In reply to
This might be better in the Links SQL forum.

As for the error, Im not totally sure but I think it is related to your host limiting your memory usage.

When you restart apache all modules will be compiled and it must be going over your limit.

What I'm not sure of is how can you get access to restart apache on a shared server?...or did your host email you those errors?

Last edited by:

Paul: Jun 14, 2002, 3:46 PM
Quote Reply
Re: [Paul] Out of Memory - mod_perl In reply to
I debated to put it there or here.

I ran into a similar problem you had regarding perl versions / Apache DBI and I am trying to fix now.

Did this fix your mod_perl situation??

BTW - were you using a Verio VPS account?

Thanks - John
Quote Reply
Re: [gatman] Out of Memory - mod_perl In reply to
>>
Did this fix your mod_perl situation??
<<

Do you mean the killall -HUP httpd command?...if so yes it did fix the problem.

>>
BTW - were you using a Verio VPS account?
<<

Not it was a dedicated RedHat server (not with Verio).

Last edited by:

Paul: Jun 14, 2002, 4:30 PM
Quote Reply
Re: [Paul] Out of Memory - mod_perl In reply to
Well I am running perl 5.005003 just like System Info says. So issue isn't here?

(Verio doesn't use perl -v command for virtual accounts - they use %virtual perl -v) andother lesson.



Anyway - still quite stumped on out of memory problem
Post deleted by SeanP In reply to
Quote Reply
Re: [gatman] Out of Memory - mod_perl In reply to
In Reply To:
System Info =>

System Information
======================================
Perl Version: 5.00503
Links SQL Version: 2.1.0
Persistant Env: mod_perl (0) SpeedyCGI (0)
@INC =
/usr/home/gatay/usr/local/etc/httpd/cgi-bin/links/admin
/usr/local/lib/perl5/5.00503/i386-freebsd
/usr/local/lib/perl5/5.00503
/usr/local/lib/site_perl
/usr/local/lib/site_perl

It doesn't look like you're running under mod_perl. When Links is running under mod_perl, the system info will read:

mod_perl (1)

Sean
Quote Reply
Re: [SeanP] Out of Memory - mod_perl In reply to
I think thats due to the memory problem he's having...until apache restarts properly it probably won't show 1
Quote Reply
Re: [Paul] Out of Memory - mod_perl In reply to
Ah, you're probably right.

Sean
Quote Reply
Re: [gatman] Out of Memory - mod_perl In reply to
[Fri Jun 14 16:11:18 2002] [notice] Apache/1.3.22 OpenSSL/0.9.6c (Unix) PHP/4.1.2 mod_perl/1.21 configured -- resuming normal operations
[Fri Jun 14 16:11:18 2002] [notice] Accept mutex: flock (Default: flock)
-------------------------------------------------------------------------

Here is another log snippet I just saw

Apache.pm failed to load!.
[Fri Jun 14 17:01:52 2002] [error] Perl lib version (5.00503) doesn't match executable version (5.006001) at /usr/local/lib/perl5/5.00503/i386-freebsd/Config.pm line 7.
Compilation failed in require at /usr/local/lib/perl5/5.00503/lib.pm line 4.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.00503/lib.pm line 4.
Compilation failed in require at /usr/local/etc/httpd/cgi-bin/startup.pl line 2.
BEGIN failed--compilation aborted at /usr/local/etc/httpd/cgi-bin/startup.pl line 2.
Compilation failed in require at (eval 2) line 1.



It seems Apache is loading mod_perl correctly but choking on the reference to the startup.pl file execution. The startup.pl file is executing ok on the command line. When chatting with Verio support they acknowledge that memory spikes at the restart of Apache. We also tried a "unlimit" / "ulimit" which removes some memory restriction. Is the program requiring more than 20mb to start?? Is there another config option? Stumped (againCrazy) John

Last edited by:

gatman: Jun 15, 2002, 5:30 AM
Quote Reply
Re: [gatman] Out of Memory - mod_perl In reply to
Any suggestions?
Quote Reply
Re: [gatman] Out of Memory - mod_perl In reply to
I think this is an issue for your host to deal with.

>>Perl lib version (5.00503) doesn't match executable version (5.006001) <<
Quote Reply
Re: [gatman] Out of Memory - mod_perl In reply to
I think Paul's right, it's that verio setup (where the webserver is chrooted). It looks like mod_perl was built against perl 5.6.1, however it's trying to load perl 5.005_03 modules. This is probably due to the chroot'ed setup.

Also, yes, you could well need more then 20 megs of memory for a mod_perl server.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Out of Memory - mod_perl In reply to
Can't due anything about memory usage, but will check with Verio on verion issues



Thanks for all help.



John