Re: [Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts
On Thu, 30 Apr 2009, Matt S Trout wrote: On Thu, Apr 30, 2009 at 02:44:05PM +0200, Erik Wasser wrote: On Tuesday 28 April 2009, Matt S Trout wrote: Two possibilities: (1) exec a $^X to print @INC to get the "normal" @INC (2) use $Config{arch} and /^5.\/ to strip off the extra ones. Thoughts? I think (1) is more bulletproof. I think a restart costs a lot of time and an additional call of $^X doesn't matter here. I think I agree. Fancy having a go at a patch? I -still- don't use -r so I -still- can't really shake such a patch out in real world usage :) My new restarter code avoids this issue entirely. It doesn't actually re-execute the initial script (which runs forever), it just restarts the web server piece (and reloads the app itself). -dave /* http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) */ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts
On Thu, Apr 30, 2009 at 02:44:05PM +0200, Erik Wasser wrote: > On Tuesday 28 April 2009, Matt S Trout wrote: > > > Two possibilities: > > > > (1) exec a $^X to print @INC to get the "normal" @INC > > > > (2) use $Config{arch} and /^5.\/ to strip off the extra ones. > > > > Thoughts? > > I think (1) is more bulletproof. I think a restart costs a lot of time > and an additional call of $^X doesn't matter here. I think I agree. Fancy having a go at a patch? I -still- don't use -r so I -still- can't really shake such a patch out in real world usage :) -- Matt S Trout Catalyst and DBIx::Class consultancy with a clue Technical Director and a commit bit: http://shadowcat.co.uk/catalyst/ Shadowcat Systems Limited mst (@) shadowcat.co.ukhttp://shadowcat.co.uk/blog/matt-s-trout/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts
On Tuesday 28 April 2009, Matt S Trout wrote: > Two possibilities: > > (1) exec a $^X to print @INC to get the "normal" @INC > > (2) use $Config{arch} and /^5.\/ to strip off the extra ones. > > Thoughts? I think (1) is more bulletproof. I think a restart costs a lot of time and an additional call of $^X doesn't matter here. -- So long... Fuzz ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts
On Mon, Apr 27, 2009 at 12:45:29PM +0100, Mike Glen wrote: > Matt S Trout wrote: > >On Thu, Apr 23, 2009 at 09:51:59AM +0100, Mike Glen wrote: > > > >>I think it might be due to line 335 in HTTP.pm > >>335 $ENV{PERL5LIB} .= join $Config{path_sep}, @INC; > >> > > > >Hmm. That's to try and make sure -I calls on the original perl invocation > >get included. I guess what you need to do is try something like - > > > >my %already; > >@already{split(quotemeta($Config{path_sep}), $ENV{PERL5LIB})} = 1; > > > >$ENV{PERL5LIB} .= join $Config{path_sep}, grep !$already{$_} @INC; > > > >or so. > > > >Fancy having a play and seeing if you can come up with a patch for us? > > > > > I have played around with this for a while and have made some progress. > What seems to be happening is that with every restart @INC is increasing > in size. > New directory paths are being added > These are being created by appending the following to each existing path > /i386-linux-thread-multi > /5.8.5 > /5.8.4 > /5.8.3 > /5.8.2 > /5.8.1 > /5.8.0 > > Each of these new paths are unique so no obvious way I can see to filter > them out > And finding out why @INC is being added to in this way is beyond the > scope of my current knowledge. Let me guess. Red Hat? They do "clever" things like that. Two possibilities: (1) exec a $^X to print @INC to get the "normal" @INC (2) use $Config{arch} and /^5.\/ to strip off the extra ones. Thoughts? -- Matt S Trout Catalyst and DBIx::Class consultancy with a clue: Technical Directorhttp://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Any questions? Mail mst shadowcat.co.uk My blog: http://www.shadowcat.co.uk/blog/matt-s-trout/ (warning: profanity) ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts
Matt S Trout wrote: On Thu, Apr 23, 2009 at 09:51:59AM +0100, Mike Glen wrote: I think it might be due to line 335 in HTTP.pm 335 $ENV{PERL5LIB} .= join $Config{path_sep}, @INC; Hmm. That's to try and make sure -I calls on the original perl invocation get included. I guess what you need to do is try something like - my %already; @already{split(quotemeta($Config{path_sep}), $ENV{PERL5LIB})} = 1; $ENV{PERL5LIB} .= join $Config{path_sep}, grep !$already{$_} @INC; or so. Fancy having a play and seeing if you can come up with a patch for us? I have played around with this for a while and have made some progress. What seems to be happening is that with every restart @INC is increasing in size. New directory paths are being added These are being created by appending the following to each existing path /i386-linux-thread-multi /5.8.5 /5.8.4 /5.8.3 /5.8.2 /5.8.1 /5.8.0 Each of these new paths are unique so no obvious way I can see to filter them out And finding out why @INC is being added to in this way is beyond the scope of my current knowledge. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts
On Thu, Apr 23, 2009 at 09:51:59AM +0100, Mike Glen wrote: > I think it might be due to line 335 in HTTP.pm > 335 $ENV{PERL5LIB} .= join $Config{path_sep}, @INC; Hmm. That's to try and make sure -I calls on the original perl invocation get included. I guess what you need to do is try something like - my %already; @already{split(quotemeta($Config{path_sep}), $ENV{PERL5LIB})} = 1; $ENV{PERL5LIB} .= join $Config{path_sep}, grep !$already{$_} @INC; or so. Fancy having a play and seeing if you can come up with a patch for us? -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Directorhttp://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts
Erik Wasser wrote: On Wednesday 22 April 2009, Mike Glen wrote: I'm running the catalyst server (script/myapp_server) using the -r option to restart after changes are made but after every 3 or 4 restarts i get the error message Can't exec "/usr/bin/perl": Argument list too long at /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine/HTTP.pm line 337. 1) Got privileges to edit the file HTTP.pm, make a copy 2) open the file in an editor and add this 2 lines before the exec statement in line 337: use Data::Dumper warn Dumper([$^X, $0, @{ $options->{argv} }]); Look at the output and post it here. I added the lines above. Ouput shown below First restart $VAR1 = [ '/usr/bin/perl', 'script/learningpath_server.pl', '-r' ]; Restarts OK Second restart $VAR1 = [ '/usr/bin/perl', 'script/learningpath_server.pl', '-r' ]; Restarts OK Third restart $VAR1 = [ '/usr/bin/perl', 'script/learningpath_server.pl', '-r' ]; Can't exec "/usr/bin/perl": Argument list too long at /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine/HTTP.pm line 340. So nothing changes there I think it might be due to line 335 in HTTP.pm 335 $ENV{PERL5LIB} .= join $Config{path_sep}, @INC; I changed your hack above to use Data::Dumper; warn Dumper([$^X, $0, @{ $options->{argv} }], length($ENV{PERL5LIB}) ); and the output for $VAR2 to grows after each restart 1st restart $VAR2 = 1222; 2nd restart $VAR2 = 13715; 3rd restart $VAR2 = 134057; And then to use Data::Dumper; warn Dumper([$^X, $0, @{ $options->{argv} }],$ENV{PERL5LIB} ); 1st restart $VAR2 = '/catalyst/mindsweep/LearningPath/script/../lib:/usr/lib/perl5/5.8.5/i386-linux-thread-multi:/usr/lib/perl5/5.8.5:/usr/lib/perl5/site_perl/5.8.5/i386- linux-thread-multi:/usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi:/usr/lib/perl5/site_perl/5.8. 2/i386-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi:/usr/lib/perl5/site_pe rl/5.8.5:/usr/lib/perl5/site_perl/5.8.4:/usr/lib/perl5/site_perl/5.8.3:/usr/lib/perl5/site_perl/5.8.2:/usr/lib/perl5/site_perl/5.8.1:/usr/lib/perl5/site_perl/ 5.8.0:/usr/lib/perl5/site_perl:/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi:/usr/lib/perl 5/vendor_perl/5.8.3/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi: /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.5:/usr/lib/perl5/vendor_perl/5.8.4:/usr/lib/perl5/vendor_perl/5.8.3:/u sr/lib/perl5/vendor_perl/5.8.2:/usr/lib/perl5/vendor_perl/5.8.1:/usr/lib/perl5/vendor_perl/5.8.0:/usr/lib/perl5/vendor_perl:.'; 2nd restart $VAR2 = '/catalyst/mindsweep/LearningPath/script/../lib:/usr/lib/perl5/5.8.5/i386-linux-thread-multi:/usr/lib/perl5/5.8.5:/usr/lib/perl5/site_perl/5.8.5/i386- linux-thread-multi:/usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi:/usr/lib/perl5/site_perl/5.8. 2/i386-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi:/usr/lib/perl5/site_pe rl/5.8.5:/usr/lib/perl5/site_perl/5.8.4:/usr/lib/perl5/site_perl/5.8.3:/usr/lib/perl5/site_perl/5.8.2:/usr/lib/perl5/site_perl/5.8.1:/usr/lib/perl5/site_perl/ 5.8.0:/usr/lib/perl5/site_perl:/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi:/usr/lib/perl 5/vendor_perl/5.8.3/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi: /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.5:/usr/lib/perl5/vendor_perl/5.8.4:/usr/lib/perl5/vendor_perl/5.8.3:/u sr/lib/perl5/vendor_perl/5.8.2:/usr/lib/perl5/vendor_perl/5.8.1:/usr/lib/perl5/vendor_perl/5.8.0:/usr/lib/perl5/vendor_perl:./catalyst/mindsweep/LearningPath/ script/../lib:/catalyst/mindsweep/LearningPath/script/../lib/5.8.5/i386-linux-thread-multi:/catalyst/mindsweep/LearningPath/script/../lib/5.8.5:/catalyst/mind sweep/LearningPath/script/../lib/i386-linux-thread-multi:/catalyst/mindsweep/LearningPath/script/../lib/5.8.4:/catalyst/mindsweep/LearningPath/script/../lib/5 .8.3:/catalyst/mindsweep/LearningPath/script/../lib/5.8.2:/catalyst/mindsweep/LearningPath/script/../lib/5.8.1:/catalyst/mindsweep/LearningPath/script/../lib/ 5.8.0:/usr/lib/perl5/5.8.5/i386-linux-thread-multi/5.8.5/i386-linux-thread-multi:/usr/lib/perl5/5.8.5/i386-linux-thread-multi/5.8.5:/usr/lib/perl5/5.8.5/i386- linux-thread-multi/i386-linux-thread-multi:/usr/lib/perl5/5.8.5/i386-linux-thread-multi/5.8.4:/usr/lib/perl5/5.8.5/i386-linux-thread-multi/5.8.3:/usr/lib/perl 5/5.8.5/
Re: [Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts
On Wednesday 22 April 2009, Mike Glen wrote: > I'm running the catalyst server (script/myapp_server) using the -r > option to restart after changes are made but after every 3 or 4 > restarts i get the error message > > Can't exec "/usr/bin/perl": Argument list too long at > /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine/HTTP.pm line 337. 1) Got privileges to edit the file HTTP.pm, make a copy 2) open the file in an editor and add this 2 lines before the exec statement in line 337: use Data::Dumper warn Dumper([$^X, $0, @{ $options->{argv} }]); Look at the output and post it here. -- So long... Fuzz ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts
I'm running the catalyst server (script/myapp_server) using the -r option to restart after changes are made but after every 3 or 4 restarts i get the error message Can't exec "/usr/bin/perl": Argument list too long at /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine/HTTP.pm line 337. Does anyone know how i can stop this? Catalyst 5.71000 perl, v5.8.5 Centos Thanks ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/