You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kit DeKat <ki...@kitdekat.com> on 2003/12/17 17:14:14 UTC
Perl warn failures
Summary:
Perl pages 'lock up' silently on R9.0/P5.8.0/A2.0.48 with NameVirtualHosts
and unique error_log's for each project name. The 'lock up' appears at warn
statements, but only after many calls to warn. If the scripts or loops are
small, they work and warn message are seen, but if there are too many calls
to warn throughout the script, no warn messages appear anywhere and script
fails silently.
Details:
We recently migrated some web applications from an old server to a new one
using a CVS repository. The project was working perfectly on redhat 7.3,
9.0 and AS2.1 running either Perl 5.6 or 5.8 with mixed Apache 1.3 and 2.0
on these servers -- in general, a hodge-podge. The reason for the list is
because the same application, checked-out from CVS works fine on all
servers except the app-server we want to use :P the rest are dev-boxes for
the application.
The old app-server was R7.3/P5.6.1/A1.3.23 (Redhat/Perl/Apache versions)
and through CVS migrated to a the new app-server, which is
R9.0/P5.8.0/A2.0.48 and afterwards our scripts starting
freezing/timeouts/partial data retrieval. The pages would run After
examining the scripts, we started commenting out all the 'warn' statements
and the pages started working perfectly.
What baffles us is that we have two other identical copies of the
application running on an nigh identical R9.0/P5.8.0/A2.0.48 and another
R9.0/P5.8.0/A1.3.23 and these two work perfectly and all messages are
'warn'd out appropriately and page output is complete -- nothing wrong. The
only differences between the nigh identical servers is that the dev-server
has PHP 4.3.2 and MySQl 4.x installed as well. Both servers have
NameVirtualHost *:80, but the dev-server has all names going to one
error_log, while the app-server has these seperated by project name. All
other Apache related messages appear in each log accordingly, but no Perl
'warn' messages appear anywhere, which is why we started to comment them
out to fix them. But we obviously need them in order to fix user errors
when they use the app-server.
My guess is that the Perl cant find the appropriate log to write the
messages to and bombs silently.
Best regards,
Kit DeKat mailto:kitdekat@kitdekat.com
Web/Systems Programmer
-----BEGIN PERL GEEK CODE BLOCK-----
Version: 0.01
P++>+++@$c---P6-R >++M+$O+>+++(++)$MA >+E+PU >+BD >++C >*$
D++S++>+++@X>++WP?MO?PP!n?CO?PO--o?G A--Ee+++Ev w+m!
------END PERL GEEK CODE BLOCK------
---------- BEGIN CAT CODE CODE BLOCK ---------
Mana: DSWtrG3X+LW+C+++IT+/-AE+H+S+V+F+Q++P+B-PAPL+
-- http://ratcliffe.org/cats/catcodes.shtml --
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Perl warn failures
Posted by Stas Bekman <st...@stason.org>.
[Kit, next time you start a new thread, make sure you don't reply to one of
the existing posts, but start a new one afresh. By replying to an existing
post you insert a totally unrelated thread into an existing one, which
confuses mail clients and some archive software. Thank you.]
Kit DeKat wrote:
> Summary:
>
> Perl pages 'lock up' silently on R9.0/P5.8.0/A2.0.48 with
> NameVirtualHosts and unique error_log's for each project name. The 'lock
> up' appears at warn statements, but only after many calls to warn. If
> the scripts or loops are small, they work and warn message are seen, but
> if there are too many calls to warn throughout the script, no warn
> messages appear anywhere and script fails silently.
>
> Details:
>
> We recently migrated some web applications from an old server to a new
> one using a CVS repository. The project was working perfectly on redhat
> 7.3, 9.0 and AS2.1 running either Perl 5.6 or 5.8 with mixed Apache 1.3
> and 2.0 on these servers -- in general, a hodge-podge. The reason for
> the list is because the same application, checked-out from CVS works
> fine on all servers except the app-server we want to use :P the rest are
> dev-boxes for the application.
>
> The old app-server was R7.3/P5.6.1/A1.3.23 (Redhat/Perl/Apache versions)
> and through CVS migrated to a the new app-server, which is
> R9.0/P5.8.0/A2.0.48 and afterwards our scripts starting
> freezing/timeouts/partial data retrieval. The pages would run After
> examining the scripts, we started commenting out all the 'warn'
> statements and the pages started working perfectly.
>
> What baffles us is that we have two other identical copies of the
> application running on an nigh identical R9.0/P5.8.0/A2.0.48 and another
> R9.0/P5.8.0/A1.3.23 and these two work perfectly and all messages are
> 'warn'd out appropriately and page output is complete -- nothing wrong.
> The only differences between the nigh identical servers is that the
> dev-server has PHP 4.3.2 and MySQl 4.x installed as well. Both servers
> have NameVirtualHost *:80, but the dev-server has all names going to one
> error_log, while the app-server has these seperated by project name. All
> other Apache related messages appear in each log accordingly, but no
> Perl 'warn' messages appear anywhere, which is why we started to comment
> them out to fix them. But we obviously need them in order to fix user
> errors when they use the app-server.
>
> My guess is that the Perl cant find the appropriate log to write the
> messages to and bombs silently.
When you use warn() it should write to the main server's log, in order to
write to a specific server's log you need call one of the logging methods on
$r or $s objects:
http://perl.apache.org/docs/2.0/api/Apache/Log.html#Request_Logging_Methods
http://perl.apache.org/docs/2.0/api/Apache/Log.html#Server_Logging_Methods
As for locking, have you tried running strace on the process that locks and
seeing what does it do? It's the best to start the server in a single server
mode: httpd -DONE_PROCESS -DNO_DETACH, so that you know which process to
strace. Since you say that without PHP things work just fine, it's possible
that PHP redefines/reopens some log files?
Also as Ged pointed out, when submitting bug reports we need you to provide
more info, as explained at http://perl.apache.org/bugs/
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Perl warn failures
Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi there,
On Wed, 17 Dec 2003, Kit DeKat wrote:
> The old app-server was R7.3/P5.6.1/A1.3.23 (Redhat/Perl/Apache versions)
> and through CVS migrated to a the new app-server, which is
> R9.0/P5.8.0/A2.0.48 and afterwards our scripts starting
> freezing/timeouts/partial data retrieval.
Hmmmm. You were rather asking for it, changing everything at once like that.
Are you using mod_perl? If not you're asking on the wrong list.
73,
Ged.
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html