After my Apache/mod_perl/SOAP::Lite based server is running for a while and working perfectly, I get the following error when making a
SOAP call:
Error occurred making remote request call
(Failed to locate method (search) in class (ABC_DB_SOAP) at
/usr/local/perl/lib/site_perl/5.8.8/SOAP/Lite.pm line 2586.)
where the method is 'search' and the module name is 'ABC_DB_SOAP'
If I try to make the same call right away, it may work or I might get the same error. I assume this is because it uses a different or same httpd child process. As time goes on and the server is used more, the frequency of the errors is higher...
The entry in my httpd.conf file is:
<Location /server>
SetHandler perl-script
PerlHandler Apache::SOAP
PerlSetVar options "compress_threshold => 1048576"
PerlSetVar dispatch_to "/usr/local/mystuff/soap,ABC_DB_SOAP"
</Location>
Reading the perldoc for SOAP::Lite, it mentions:
For dynamic deployment you can specify the name either directly (in th
+at case it will be "require"d without any restriction) or indirectly,
+ with a PATH. In that case, the ONLY path that will be available will
+ be the PATH given to the dispatch_to() method). For information how
+to handle this situation see "SECURITY" section.
I 'use' various Perl modules in ABC_DB_SOAP.pm and also 'use' them in a mod_perl startup script which is defined in httpd.conf using PerlRequire - for example:
PerlRequire /usr/local/mystuff/conf/startup.pl
So I think that this is synonymous to the methods offered in the SECURITY section. Here is what the startup.pl file looks like:
#!/usr/local/perl/bin/perl
use ModPerl::Util ();
use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::RequestUtil ();
use Apache2::ServerRec ();
use Apache2::ServerUtil ();
use Apache2::Connection ();
use Apache2::Log ();
use Apache2::Const -compile => ':common';
use APR::Const -compile => ':common';
use APR::Table ();
use DBI;
use MyModule;
1;
The DBI module is built into my Perl distro, but MyModule resides under /usr/local/mystuff/lib. I use PERL5LIB to include this path to my @INC Could this be an issue?
- OS - AIX 5.3
- Perl 5.8.8
- SOAP::Lite
- Apache 2.2.4
- mod_perl 2.0.3
I should also mention we that the Apache and Perl are NFS mounted - as well as all the Perl modules described above. I know this is probably not the best way to run - but in the environment I am provided, we have little choice.
I have seen this issue mentioned before by Googling for it, Perl Monks, etc... - but have not found any definitive solutions.
Any ideas? Thanks in advance...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.