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

MAX_CONTENT_SIZE in SOAP::Lite

Expand Messages
  • ritun2000
    Hello all, I just found through some trial and error that SOAP::LIte does not process data greater than 75000 bytes. I was trying to figure out, where this
    Message 1 of 6 , Jun 7 4:24 AM
    • 0 Attachment
      Hello all,

      I just found through some trial and error that SOAP::LIte does not
      process data greater than 75000 bytes.
      I was trying to figure out, where this value has been set, but couldn't.
      I just found, the below line in SOAP::Transport::HTTP::CGI

      } elsif (defined $SOAP::Constants::MAX_CONTENT_SIZE && $length >
      $SOAP::Constants::MAX_CONTENT
      _SIZE) {
      $self->response(HTTP::Response->new(413)) # REQUEST ENTITY TOO LARGE
      }

      Is it possible to increase the limit for data size? If yes, where do i
      define it.
      Further, will increasing the limit, make performance of the library
      suffer?

      Awaiting pointers..

      Regards,
      Ritu
    • Paul Kulchenko
      Hi, Ritu! What do you mean by does not process ? What errors are your getting? There is no size limitations in SOAP::Lite and I ve tested it with the messages
      Message 2 of 6 , Jun 7 11:47 AM
      • 0 Attachment
        Hi, Ritu!

        What do you mean by "does not process"? What errors are your getting?
        There is no size limitations in SOAP::Lite and I've tested it with
        the messages up to 5MB in length. You're mostly restricted by the
        amount of available memory and complexity of your data structure.
        MAX_CONTENT_SIZE variable allows you to limit the size of the message
        for CGI transport, but it's switched off by default.

        Best wishes, Paul.

        --- ritun2000 <ritun2000@...> wrote:
        > Hello all,
        >
        > I just found through some trial and error that SOAP::LIte does
        > not
        > process data greater than 75000 bytes.
        > I was trying to figure out, where this value has been set, but
        > couldn't.
        > I just found, the below line in SOAP::Transport::HTTP::CGI
        >
        > } elsif (defined $SOAP::Constants::MAX_CONTENT_SIZE && $length >
        > $SOAP::Constants::MAX_CONTENT
        > _SIZE) {
        > $self->response(HTTP::Response->new(413)) # REQUEST ENTITY TOO
        > LARGE
        > }
        >
        > Is it possible to increase the limit for data size? If yes, where
        > do i
        > define it.
        > Further, will increasing the limit, make performance of the library
        > suffer?
        >
        > Awaiting pointers..
        >
        > Regards,
        > Ritu
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > 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/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Yahoo! - Official partner of 2002 FIFA World Cup
        http://fifaworldcup.yahoo.com
      • ritun2000
        Hi Paul, Thanks a lot for your prompt response. I have three test cases here and varying responses: Case 1: The test was done by writing a client and running
        Message 3 of 6 , Jun 8 2:36 AM
        • 0 Attachment
          Hi Paul,

          Thanks a lot for your prompt response.

          I have three test cases here and varying responses:

          Case 1:
          The test was done by writing a client and running it thru the command
          line on a remote machine.
          This is the error i get on the server log, when i send data greater
          than 75000 bytes..

          [error] [client 192.168.2.2] Request content-length of 93369 is large
          r than the configured limit of 75000

          Further, this is the error on the SOAP client,
          413 Request Entity Too Large at\ ./testservice.pl line 50

          I do not understand where this has been configured.

          Case 2:
          When i try using a cgi program as a client from the same machine (and
          using the same server), the program works successfully for a very
          small amount of data..approx. 500 bytes only. After that, the cgi
          script just times out. I do not receive any response from the server,
          even if the data size is increased minimally. ( The processing happens
          on the server though, checked by printing messages in the logs.)

          Thus, you see, the permformance deteriorates badly in a CGI environment.

          Case 3:
          Here, I tried ran the command line client on the same machine as the
          server. Here, again the performance deteriorated. It worked for about
          5000 bytes of data, but after that the script dies with the following
          error:
          500 Read Timeout at testserviceon2.pl line 41

          The server log shows the following error in this case:
          [Premature end of script headers: outliner.cgi]

          Any pointers what could be going wrong?
          I have checked with the admin, and we have not made any configuration
          changes too. Further, all the machines used have good configurations.

          Regards,
          Ritu
          --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
          > Hi, Ritu!
          >
          > What do you mean by "does not process"? What errors are your getting?
          > There is no size limitations in SOAP::Lite and I've tested it with
          > the messages up to 5MB in length. You're mostly restricted by the
          > amount of available memory and complexity of your data structure.
          > MAX_CONTENT_SIZE variable allows you to limit the size of the message
          > for CGI transport, but it's switched off by default.
          >
          > Best wishes, Paul.
          >
          > --- ritun2000 <ritun2000@y...> wrote:
          > > Hello all,
          > >
          > > I just found through some trial and error that SOAP::LIte does
          > > not
          > > process data greater than 75000 bytes.
          > > I was trying to figure out, where this value has been set, but
          > > couldn't.
          > > I just found, the below line in SOAP::Transport::HTTP::CGI
          > >
          > > } elsif (defined $SOAP::Constants::MAX_CONTENT_SIZE && $length >
          > > $SOAP::Constants::MAX_CONTENT
          > > _SIZE) {
          > > $self->response(HTTP::Response->new(413)) # REQUEST ENTITY TOO
          > > LARGE
          > > }
          > >
          > > Is it possible to increase the limit for data size? If yes, where
          > > do i
          > > define it.
          > > Further, will increasing the limit, make performance of the library
          > > suffer?
          > >
          > > Awaiting pointers..
          > >
          > > Regards,
          > > Ritu
          > >
          > >
          > > ------------------------ Yahoo! Groups Sponsor
          > >
          > > To unsubscribe from this group, send an email to:
          > > soaplite-unsubscribe@y...
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to
          > > http://docs.yahoo.com/info/terms/
          > >
          > >
          >
          >
          > __________________________________________________
          > Do You Yahoo!?
          > Yahoo! - Official partner of 2002 FIFA World Cup
          > http://fifaworldcup.yahoo.com
        • ritun2000
          Hi Paul, I have attached the client code herewith for your reference. #!/usr/bin/perl BEGIN { $::INC[@::INC] = /net/lib ; require Netconfig; require CGI;
          Message 4 of 6 , Jun 8 3:10 AM
          • 0 Attachment
            Hi Paul,

            I have attached the client code herewith for your reference.

            #!/usr/bin/perl

            BEGIN {
            $::INC[@::INC] = "/net/lib";
            require Netconfig;
            require CGI;
            require Utils;
            use Data::Dumper;
            use strict;
            use SOAP::Lite;
            select((select(STDERR),$|=1)[0]);
            }
            # REAding the data from the file
            my ($hyphenfile, $hyphstr);
            $hyphenfile = "/net/doc/webservices/hyphen.txt";
            if(! ::file2str($hyphenfile, \$hyphstr)) {
            print "testservice.pl:: file2str failed\n";
            }
            @hyphdata = split(/\n\s*\n/,$hyphstr);
            print "ARRAY BEING GENERATED \n\n";
            foreach $hyphstr(@hyphdata){
            print "ELEMENT :: $hyphstr\n\n";
            }

            # Call method txt2opml

            my $soap = SOAP::Lite
            -> uri('http://192.168.2.58/OutlinerService')
            -> proxy
            ('http://192.168.2.58/outlinerbin/webservices/outliner.cgi');
            $result = $soap->txt2opml(@hyphdata);
            $outfiles = $result->result();

            print "OPML FILES ARRAY BEING RETURNED \n\n";
            @outfiles = @$outfiles;

            print "CALLED txt2opml SUCCESSFULLY, NOW CALLING outlet2html \n\n\n";

            undef $result;
            $result = $soap->outlet2html(@outfiles);
            my $htmlarr = $result->result();
            my $other = $result->paramsout;

            print "HEADER:$other \n";
            print "HTML ARRAY BEING RETURNED \n\n";
            foreach $htmlfile(@$htmlarr){
            print "HTML FILE :: $htmlfile\n\n\n";
            }
            @htmlarr = @$htmlarr;
            print "CALLED outlet2html SUCCESSFULLY\n\n\n";

            The script usually fails while calling the second method (outlet2html)
            or while receiving the output of the first method (txt2opml).

            Further, here's the server code: (outliner.cgi)

            #!/usr/bin/perl

            use SOAP::Transport::HTTP;

            SOAP::Transport::HTTP::CGI
            -> dispatch_to('/net/lib/perl','OutlinerService')
            -> handle;


            I tried the server code with and without the Compress option.

            --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
            > Hi, Ritu!
            >
            > What do you mean by "does not process"? What errors are your
            getting?
            > There is no size limitations in SOAP::Lite and I've tested it with
            > the messages up to 5MB in length. You're mostly restricted by the
            > amount of available memory and complexity of your data structure.
            > MAX_CONTENT_SIZE variable allows you to limit the size of the
            message
            > for CGI transport, but it's switched off by default.
            >
            > Best wishes, Paul.
            >
            > --- ritun2000 <ritun2000@y...> wrote:
            > > Hello all,
            > >
            > > I just found through some trial and error that SOAP::LIte does
            > > not
            > > process data greater than 75000 bytes.
            > > I was trying to figure out, where this value has been set, but
            > > couldn't.
            > > I just found, the below line in SOAP::Transport::HTTP::CGI
            > >
            > > } elsif (defined $SOAP::Constants::MAX_CONTENT_SIZE && $length >
            > > $SOAP::Constants::MAX_CONTENT
            > > _SIZE) {
            > > $self->response(HTTP::Response->new(413)) # REQUEST ENTITY TOO
            > > LARGE
            > > }
            > >
            > > Is it possible to increase the limit for data size? If yes, where
            > > do i
            > > define it.
            > > Further, will increasing the limit, make performance of the
            library
            > > suffer?
            > >
            > > Awaiting pointers..
            > >
            > > Regards,
            > > Ritu
            > >
            > >
            > > ------------------------ Yahoo! Groups Sponsor
            > >
            > > To unsubscribe from this group, send an email to:
            > > soaplite-unsubscribe@y...
            > >
            > >
            > >
            > > Your use of Yahoo! Groups is subject to
            > > http://docs.yahoo.com/info/terms/
            > >
            > >
            >
            >
            > __________________________________________________
            > Do You Yahoo!?
            > Yahoo! - Official partner of 2002 FIFA World Cup
            > http://fifaworldcup.yahoo.com
          • Joi Ellis
            ... The CGI module has size limits in it by default. You need to edit the CGI.pm module and change it. Look for variable $POST_MAX. -- Joi Ellis
            Message 5 of 6 , Jun 8 6:23 AM
            • 0 Attachment
              On Sat, 8 Jun 2002, ritun2000 wrote:

              >Date: Sat, 08 Jun 2002 10:10:12 -0000
              >From: ritun2000 <ritun2000@...>
              >To: soaplite@yahoogroups.com
              >Subject: [soaplite] Re: MAX_CONTENT_SIZE in SOAP::Lite
              >
              >Hi Paul,
              >
              > I have attached the client code herewith for your reference.
              >
              >#!/usr/bin/perl
              >
              >BEGIN {
              > $::INC[@::INC] = "/net/lib";
              > require Netconfig;
              > require CGI;

              The CGI module has size limits in it by default. You need to edit the
              CGI.pm module and change it. Look for variable $POST_MAX.


              --
              Joi Ellis
              gyles19@..., http://www.visi.com/~gyles19/
            • Duncan Cameron
              ... This points to a configuration limit in your web server, nothing to do with SOAP::Lite. ... This is the http status code returned by your web server before
              Message 6 of 6 , Jun 8 6:26 AM
              • 0 Attachment
                On 2002-06-08 ritun2000 wrote:
                >Hi Paul,
                >
                > Thanks a lot for your prompt response.
                >
                >I have three test cases here and varying responses:
                >
                >Case 1:
                > The test was done by writing a client and running it thru the command
                >line on a remote machine.
                > This is the error i get on the server log, when i send data greater
                >than 75000 bytes..
                >
                >[error] [client 192.168.2.2] Request content-length of 93369 is large
                >r than the configured limit of 75000
                >
                This points to a configuration limit in your web server, nothing to do with SOAP::Lite.

                >Further, this is the error on the SOAP client,
                >413 Request Entity Too Large at\ ./testservice.pl line 50
                >
                >I do not understand where this has been configured.

                This is the http status code returned by your web server before it has chance to
                run your CGI. SOAP::Lite just passes it back to your client.

                Regards,
                Duncan Cameron
              Your message has been successfully submitted and would be delivered to recipients shortly.