Schrift
[thread]3159[/thread]

Fehlermeldung versteh ich nicht



<< |< 1 2 >| >> 12 Einträge, 2 Seiten
J-jayz-Z
 2005-09-14 23:26
#31173 #31173
User since
2005-04-13
625 Artikel
BenutzerIn
[Homepage] [default_avatar]
Hi,

Mein error.log vom apache liefert mir eine Fehlermeldung, die manchmal ein Internal Server Error hervorruft und manchmal nicht.
e:
Code: (dl )
1
2
[Wed Sep 14 21:16:25 2005] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Wed Sep 14 21:20:25 2005] [error] [client 217.184.129.55] (12)Cannot allocate memory: couldn't spawn child process: /var/www/perl-tutor/cgi/perl_oo.pl


Der passende COde dazu ruft aber kein Fork auf...
Der sieht nur so aus:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl
use strict;
use warnings;

use HTML::Template;
use CGI qw/:standart fatalsToBrowser/;

my $template = HTML::Template->new(filename => '../template.tmpl');

open(OOP, "<oo.txt") || die "$!";
my @main = <OOP>;
close(OOP);

$template->param(MAIN => "@main");

print "Content-Type: text/html\n\n", $template->output;

jemand ne idee, woran das liegen könnte?
perl -Mstrict -Mwarnings -e 'package blub; sub new { bless {} } sub bar {my $self=shift; $self->{bla}="5065726c2d436f6d6d756e697479"; return $self->{bla};} my $foo=blub->new();print "Hallo ";print pack("H*",$foo->bar()); print "\n"'

http://perl-tutor.de
pacey
 2005-09-14 23:36
#31174 #31174
User since
2004-03-01
23 Artikel
BenutzerIn
[Homepage] [default_avatar]
Quote
Cannot allocate memory


er kann den speicher den er braucht net zuweisen (um zu forken) da du dein perl script net forkst kommt es vom apache.

also rein übersetzungstechnisch....

also folgende möglichkeiten würden mir spontan einfallen:
Du hast die maximale Speichernutzung deines Apaches begrenzt.
Du hast weniger RAM drin / deine SWAP ist voll oder du hast keine.

das würde mir jetzt spontan einfallen.
mach doch mal nen

Code: (dl )
1
2
$cat /proc/meminfo
$du -sh oo.txt


von daher mal
einen netten abend noch
pacey aka FlorianBeisel
Quote
If You don't know what it does, why do you put it in your code

Code: ()
1
2
3
print +(a=>b=>c=>d=>e=>f=>g=>h=>i=>j=>k=>l=>m=>n=>o=>p=>q=>r=>s=>t=>u=>v=>w=>x=>y=>z=>" ")

[9=>20=>18=>19=>-1=>0=>13=>14=>19=>7=>4=>17=>-1=>15=>4=>17=>11=>-1=>7=>0=>2=>10=>4=>17];
J-jayz-Z
 2005-09-14 23:49
#31175 #31175
User since
2005-04-13
625 Artikel
BenutzerIn
[Homepage] [default_avatar]
okay, cat /proc/meminfo
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
MemTotal:        61056 kB
MemFree: 1496 kB
Buffers: 1644 kB
Cached: 17692 kB
SwapCached: 0 kB
Active: 47276 kB
Inactive: 6764 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 61056 kB
LowFree: 1496 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 4 kB
Writeback: 0 kB
Mapped: 44236 kB
Slab: 3736 kB
CommitLimit: 30528 kB
Committed_AS: 207084 kB
PageTables: 864 kB
VmallocTotal: 449520 kB
VmallocUsed: 384 kB
VmallocChunk: 448820 kB

und du -sh oo.txt
Code: (dl )
8.0K    cgi/oo.txt

immer noch ne idee...
perl -Mstrict -Mwarnings -e 'package blub; sub new { bless {} } sub bar {my $self=shift; $self->{bla}="5065726c2d436f6d6d756e697479"; return $self->{bla};} my $foo=blub->new();print "Hallo ";print pack("H*",$foo->bar()); print "\n"'

http://perl-tutor.de
pq
 2005-09-15 00:23
#31176 #31176
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
[quote=J-jayz-Z,14.09.2005, 21:26]
Code: (dl )
use CGI qw/:standart fatalsToBrowser/;
[/quote]
aua aua, das tut weh...
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem
J-jayz-Z
 2005-09-15 00:30
#31177 #31177
User since
2005-04-13
625 Artikel
BenutzerIn
[Homepage] [default_avatar]
uups s/standart/standard/g;
perl -Mstrict -Mwarnings -e 'package blub; sub new { bless {} } sub bar {my $self=shift; $self->{bla}="5065726c2d436f6d6d756e697479"; return $self->{bla};} my $foo=blub->new();print "Hallo ";print pack("H*",$foo->bar()); print "\n"'

http://perl-tutor.de
pacey
 2005-09-15 11:37
#31178 #31178
User since
2004-03-01
23 Artikel
BenutzerIn
[Homepage] [default_avatar]
hat das dein problem gelöst ? andernfalls würde ich dich nämlich drauf hinweisen dass du nur noch 1496 KB RAM Frei sind
Quote
If You don't know what it does, why do you put it in your code

Code: ()
1
2
3
print +(a=>b=>c=>d=>e=>f=>g=>h=>i=>j=>k=>l=>m=>n=>o=>p=>q=>r=>s=>t=>u=>v=>w=>x=>y=>z=>" ")

[9=>20=>18=>19=>-1=>0=>13=>14=>19=>7=>4=>17=>-1=>15=>4=>17=>11=>-1=>7=>0=>2=>10=>4=>17];
nepos
 2005-09-15 11:44
#31179 #31179
User since
2005-08-17
1420 Artikel
BenutzerIn
[Homepage] [default_avatar]
Und vor allem laeuft die Kiste ohne Swap und das bei grade mal 64 MB RAM, wenn ich das richtig interpretiere.\n\n

<!--EDIT|nepos|1126770294-->
J-jayz-Z
 2005-09-15 18:32
#31180 #31180
User since
2005-04-13
625 Artikel
BenutzerIn
[Homepage] [default_avatar]
na ja, das ist eine UML Instanz, daran kann ich nichts ändern...
Na ja, aufgetreten ist es seither nicht mehr, aber ich mein, das ist es auch bisher eine ganze weile nicht und ich nutze schon ewig diese hp, nur unter ner anderen Domain...
perl -Mstrict -Mwarnings -e 'package blub; sub new { bless {} } sub bar {my $self=shift; $self->{bla}="5065726c2d436f6d6d756e697479"; return $self->{bla};} my $foo=blub->new();print "Hallo ";print pack("H*",$foo->bar()); print "\n"'

http://perl-tutor.de
pacey
 2005-09-16 02:04
#31181 #31181
User since
2004-03-01
23 Artikel
BenutzerIn
[Homepage] [default_avatar]
jupp interpretierst du richtig....

J-jayz-Z: wenn das ne uml instanz ist kannst du dein SWAP anstatt auf ne device node auch inne file legen. ist zwar dann net sonderlich performant aber sollte so etwas vorbeugen!

Grüße pacey\n\n

<!--EDIT|pacey|1126821911-->
Quote
If You don't know what it does, why do you put it in your code

Code: ()
1
2
3
print +(a=>b=>c=>d=>e=>f=>g=>h=>i=>j=>k=>l=>m=>n=>o=>p=>q=>r=>s=>t=>u=>v=>w=>x=>y=>z=>" ")

[9=>20=>18=>19=>-1=>0=>13=>14=>19=>7=>4=>17=>-1=>15=>4=>17=>11=>-1=>7=>0=>2=>10=>4=>17];
J-jayz-Z
 2005-09-16 18:46
#31182 #31182
User since
2005-04-13
625 Artikel
BenutzerIn
[Homepage] [default_avatar]
Okay, der Fehler kommt immer noch...
Code: (dl )
[Fri Sep 16 16:45:04 2005] [error] [client 84.56.252.238] (12)Cannot allocate memory: couldn't spawn child process: /var/www/perl-tutor/cgi/perl_net.pl
perl -Mstrict -Mwarnings -e 'package blub; sub new { bless {} } sub bar {my $self=shift; $self->{bla}="5065726c2d436f6d6d756e697479"; return $self->{bla};} my $foo=blub->new();print "Hallo ";print pack("H*",$foo->bar()); print "\n"'

http://perl-tutor.de
<< |< 1 2 >| >> 12 Einträge, 2 Seiten



View all threads created 2005-09-14 23:26.