From: Tom S. <acc...@ze...> - 2007-04-27 09:46:44
|
Hi All, I posted a question to the mod_perl mailing list but it would be better served here. 8<-- snip -------------------- Im having some mod_perl2 wierdness. Im trying to run some SOAP requests and Im getting odd things happening. Is there any reason that I should be experiencing intermittant issues dispatching SOAP methods to my class? Sometimes the methods work fine and sometimes they don't. When they don't I get the error returned in a fault string: Failed to locate method (getSession) in class (TestSpace) at /usr/local/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 2586. And then sometimes it all works perfectly. Ive tried boiling all this down to a simple test case. TestSpace.pm ------------ package MediaSpace; sub getSession { return 1; } 1; I would estimate that 50% of the requests fail. Im using Apache-2.2.4 PreforkMPM/Perl 5.8.8 with no threads support, and mod_perl-2.0.3. Any ideas would be welcomed at this point in time as Im out of ideas. Cheers, Tom 8<-- snip -------------------- I did some testing and found that the reason some of the requests and some didn't failed was because of the number of httpd processes. I cut those down and found that the problem was there all the time. After some more testing I found the solution by accident. I should probably explain what my setup is doing. /viewspace generates some HTML, which in turn loads a piece of Flash into the browser. This flash content once loaded, sends some SOAP calls to the server. It seems that the combination of running the handler to generate the HTML, followed quickly by the hander for the soap calls generates the conditions for this error. A little bit more testing and I found that slightly loading The webserver triggered this condition and once it was triggered any request to the soap handler failed. If I rename my MediaSpace folder, update the /viewspace handler and httpd.conf to reflect the change my /soap handler works perfectly. Is the /soap handler having some troubles processing the call dispatch if a folder of the same name exists in the same location? It certainly looks that way. Anyone else care to verify? My actual filestructure is like so: /webhome/MediaSpace.pm -> used to handle SOAP requests /webhome/MediaSpace/ViewSpace.pm -> mod_perl handler to generate HTML /webhome/MediaSpace/Media.pm -> media functions Some other files... . etc MediaSpace.pm ------------- package MediaSpace; sub getSession { return 1; } 1; My httpd.conf SOAP entry and mod_perl handler for the HTML generation: <Location /soap> SetHandler perl-script PerlResponseHandler Apache2::SOAP PerlSetVar dispatch_to '/webhome/' PerlSetVar options "compress_threshold => 1000" </Location> Debian on a 2.6 kernel Apache 2.2.4 (Prefork MPM) / Perl 5.8.8 (NO threads support) / mod_perl 2.03 SOAP::Lite v0.69 Apache2::SOAP v0.72 Cheers, Tom |