File:  [LON-CAPA] / loncom / lonmemcached
Revision 1.6: download - view: text, annotated - select for diffs
Tue Oct 17 05:56:34 2006 UTC (17 years, 7 months ago) by albertel
Branches: MAIN
CVS tags: version_2_5_X, version_2_5_2, version_2_5_1, version_2_5_0, version_2_4_X, version_2_4_99_0, version_2_4_2, version_2_4_1, version_2_4_0, version_2_3_X, version_2_3_99_0, version_2_3_2, version_2_3_1, version_2_3_0, version_2_2_99_1, version_2_2_99_0, HEAD
- upping to amount of memeory memcached grabs
- turning on the ability for auto gzipping large structs when sending them to memcached

    1: #!/usr/bin/perl
    2: $pidfile="/home/httpd/perl/logs/lonmemcached.pid";
    3: $logfile="/home/httpd/perl/logs/lonmemcached.log";
    4: 
    5: if (-e $pidfile) {
    6:    open(LFH,"$pidfile");
    7:    my $pide=<LFH>;
    8:    chomp($pide);
    9:    close(LFH);
   10:    if (kill 0 => $pide) { die "already running $pide"; }
   11: }
   12: 
   13: if ($pid=fork()) { exit; }
   14: open (PIDSAVE,">$pidfile");
   15: print PIDSAVE "$$\n";
   16: close(PIDSAVE);
   17: 
   18: if (-e '/usr/sbin/memcached') {
   19:     exec('/usr/sbin/memcached','-m','400','-v');
   20: } elsif (-e '/usr/bin/memcached') {
   21:     exec('/usr/bin/memcached','-m','400','-v');
   22: } else {
   23:     die("Unable to find memcached");
   24: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.