Loading ...
Sorry, an error occurred while loading the content.

mod_perl

Expand Messages
  • Sarinder Virk
    In my SOAP::Lite server, I have three perl modules (let s call them API::One, API::Two, and API::Three) all of which inherit from a core module (called
    Message 1 of 3 , Apr 10, 2002
    • 0 Attachment
      In my SOAP::Lite server, I have three perl modules (let's call them
      API::One, API::Two, and API::Three) all of which inherit from a core module
      (called API::Core). When running as plain CGI or as Apache::PerlRun
      everything works fine.

      When I use Apache::Registry (mod_perl) I notice that the first n requests
      (where n is the number of httpd processes) take a little long because the
      httpd child processes are loading SOAP::Lite and my perl modules, which is
      what I expected. However, the weird thing is that on subsequent requests the
      child process know *only* about the module it loaded when it was "primed"
      during its first request. For example,

      - make n requests to the server, uri dispatch to API::One -> success
      - make a request to the server, uri dispatch to API::Two -> fails!
      - make a request to the server, uri dispatch to API::Three -> fails!
      - make a request to the server, uri dispatch to API::One -> success

      The failure message is something like:
      Can't locate API/Two.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib
      .)

      My server looks like:
      #!perl -w
      use strict;
      use lib '/path/to/my/modules';
      use SOAP::Transport::HTTP;
      SOAP::Transport::HTTP::CGI
      -> dispatch_to('API::One', 'API::Two', 'API::Three')
      -> handle;

      The problem goes away when I preload the modules via apache PerlRequire
      startup.pl script use lib '/path/to/my/modules'.

      Ideas? Any help would be much appreciated.
    • Pierre DENIS
      I ve had the same problems and solved it in two ways: - In one implementation, I ve preloaded all modules at once, as you did - In another implementation,
      Message 2 of 3 , Apr 19, 2002
      • 0 Attachment
        I've had the same problems and solved it in two ways:
        - In one implementation, I've preloaded all modules at once, as you did
        - In another implementation, well... I've used a http forking daemon which
        works just fine.

        -----Original Message-----
        From: Sarinder Virk [mailto:sarinder_virk@...]
        Sent: 11 April 2002 04:55
        To: soaplite
        Cc: sarinder@...
        Subject: [soaplite] mod_perl


        In my SOAP::Lite server, I have three perl modules (let's call them
        API::One, API::Two, and API::Three) all of which inherit from a core module
        (called API::Core). When running as plain CGI or as Apache::PerlRun
        everything works fine.

        When I use Apache::Registry (mod_perl) I notice that the first n requests
        (where n is the number of httpd processes) take a little long because the
        httpd child processes are loading SOAP::Lite and my perl modules, which is
        what I expected. However, the weird thing is that on subsequent requests the
        child process know *only* about the module it loaded when it was "primed"
        during its first request. For example,

        - make n requests to the server, uri dispatch to API::One -> success
        - make a request to the server, uri dispatch to API::Two -> fails!
        - make a request to the server, uri dispatch to API::Three -> fails!
        - make a request to the server, uri dispatch to API::One -> success

        The failure message is something like:
        Can't locate API/Two.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib
        .)

        My server looks like:
        #!perl -w
        use strict;
        use lib '/path/to/my/modules';
        use SOAP::Transport::HTTP;
        SOAP::Transport::HTTP::CGI
        -> dispatch_to('API::One', 'API::Two', 'API::Three')
        -> handle;

        The problem goes away when I preload the modules via apache PerlRequire
        startup.pl script use lib '/path/to/my/modules'.

        Ideas? Any help would be much appreciated.



        To unsubscribe from this group, send an email to:
        soaplite-unsubscribe@yahoogroups.com



        Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      • Sarinder Virk
        I added the following line after the use lib statement and it worked. Not sure exactly why. push(@INC, /path/to/my/modules ); ... From: Pierre DENIS
        Message 3 of 3 , Apr 20, 2002
        • 0 Attachment
          I added the following line after the 'use lib' statement and it worked. Not sure exactly why.

          push(@INC, "/path/to/my/modules");
           
          -----Original Message-----
          From: Pierre DENIS [mailto:pdenis@...]
          Sent: Friday, April 19, 2002 9:51 AM
          To: soaplite@yahoogroups.com
          Subject: RE: [soaplite] mod_perl

          I've had the same problems and solved it in two ways:
                - In one implementation, I've preloaded all modules at once, as you did
                - In another implementation, well... I've used a http forking daemon which
          works just fine.

          -----Original Message-----
          From: Sarinder Virk [mailto:sarinder_virk@...]
          Sent: 11 April 2002 04:55
          To: soaplite
          Cc: sarinder@...
          Subject: [soaplite] mod_perl


          In my SOAP::Lite server, I have three perl modules (let's call them
          API::One, API::Two, and API::Three) all of which inherit from a core module
          (called API::Core). When running as plain CGI or as Apache::PerlRun
          everything works fine.

          When I use Apache::Registry (mod_perl) I notice that the first n requests
          (where n is the number of httpd processes) take a little long because the
          httpd child processes are loading SOAP::Lite and my perl modules, which is
          what I expected. However, the weird thing is that on subsequent requests the
          child process know *only* about the module it loaded when it was "primed"
          during its first request. For example,

          - make n requests to the server, uri dispatch to API::One  -> success
          - make a request to the server, uri dispatch to API::Two   -> fails!
          - make a request to the server, uri dispatch to API::Three -> fails!
          - make a request to the server, uri dispatch to API::One   -> success

          The failure message is something like:
          Can't locate API/Two.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib
          .)

          My server looks like:
          #!perl -w
          use strict;
          use lib '/path/to/my/modules';
          use SOAP::Transport::HTTP;
          SOAP::Transport::HTTP::CGI
              -> dispatch_to('API::One', 'API::Two', 'API::Three')
              -> handle;

          The problem goes away when I preload the modules via apache PerlRequire
          startup.pl script use lib '/path/to/my/modules'.

          Ideas? Any help would be much appreciated.



          To unsubscribe from this group, send an email to:
          soaplite-unsubscribe@yahoogroups.com



          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




          To unsubscribe from this group, send an email to:
          soaplite-unsubscribe@yahoogroups.com



          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
        Your message has been successfully submitted and would be delivered to recipients shortly.