Hi,

I have recently developed a project in Perl and it works great but it
works pretty slow because of forking. I've used mod_perl in the past,
and have also compiled mod_perl C and Perl modules myself on my
local box. This is the first time I'm trying to use mod_perl in a production
environment and I'm very frustrated! I removed mod_php support from
my server when I read on cpanel info that mod_php has issues with mod_perl
but no avail!

It compiles and it runs great but for no reason it all the scripts randomly 
gives
a 500 error! I was using XML::Simple so I realized I might have some unclosed
file handles which cause a 500 after several hits. This is what I found in the 
logs:

[error] Couldn't create file parser context for file "/home/.../xml/Test.xml": 
No such file or directory at /usr/../LibXML.pm line 427.\n at 
/usr/../LibXML/SAX.pm line 63\nCompilation failed in require a ...

The XML file exists and it it works fine on the first few runs. I am doing a 
simple
XMLin() call to generate the hashref structure and thats it! I tweaked my script
to use IO::File to open the xml file and then passed the handle to XMLin(), I 
haven't
received that 500 error for last 20 hits or so (it might just pop up again 
anytime!). The
only difference is that I'm using IO::File now and after XMLin(), I'm assigning 
'undef'
to it.

There's just one more problem. I am now getting occassional 200 OK message
with this in the error log:

[error] PerlRun: `Undefined subroutine 
&Apache::ROOTwww_2..._2ecom::testmod::testmod_search_2epl::GetMakes called at 
/home/.../testmod_search.pl line 19.\n'

You hit refresh and it works great! Sometimes I get that 200 OK error 
consecutively
for 4-5 times and then it works.

I've tried PerlFreshRestart On/Off both and I've also tried using both 
Apache::Registry
and Apache::PerlRun.

Can somebody give some pointers? What about that XML::Simple's XMLin() call?
Should I report that?

Regards,

Faisal Nasim
Pakistan



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to