Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DataSource.perfomCustomOperation() data size limits?

    I'm using DataSource.performCustomOperation to send the client side html to the server to generate a PDF file that will be stored on the server. This code works fine when the html to print is less than ~2mb. When my the html request gets bigger than about 2mb I start getting this response back from the server (which I captured with Firebug):

    Code:
    <HTML><BODY><SCRIPT>parent.isc.RPCManager.retryOperation(window.name);</SCRIPT></BODY></HTML>
    Here is the code that calls the DataSource:

    Code:
    		contentLayout.getPrintHTML(null, new PrintHTMLCallback() {
    			public void setHTML(String html) {
    				DSRequest request = new DSRequest();
    				LinkedHashMap<String, String> data = new LinkedHashMap<String, String>();
    				data.put("html", html);
    				data.put("skinName", "Jeppesen");
    				final String thePDF = getPdfFileName() + ".pdf";
    				data.put("filename", thePDF);
    				request.setData(data);
    				DataSource ds = DataSource.get("packagePrint");
    				ds.performCustomOperation("generatePdf", new Record(),
    						new DSCallback() {
    							public void execute(DSResponse response,
    									Object rawData, DSRequest request) {
    								BusyCursor.hide();
    								if ("Operation completed successfully"
    										.equals(rawData)) {
    									initBreadCrumbMC(thePDF,
    											flightPlanSummary.getPlanId());
    								} else {
    									SC.warn("Sending message failed: " + rawData);
    								}
    							}
    						}, request);
    			}
    		});
    And here is what I get in the server log:

    Code:
    2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,299 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: host:localhost:80802012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; r
    v:13.0) Gecko/20100101 Firefox/13.0.12012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: accept:text/html,application/xhtml+xml,application/xml;q=
    0.9,*/*;q=0.8
    2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: accept-language:en-us,en;q=0.52012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: accept-encoding:gzip, deflate2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: connection:keep-alive2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded; charset=U
    TF-8
    2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: referer:http://localhost:8080/fpo/Main.html
    2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: content-length:2158634
    2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: cookie:JSESSIONID=43099540270E96CA29D168BB9D6D2884; GLog=%7B%0D%20%20%20%20left%3A38%2C%20%0D%20%20%20%20top%3A527%2C%20%0D%20%20%20%20width%3A881%2C%20%0D%20%20%20%20height%3A971%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%2C%20%0D%20%20%20%20%20%20%
    20%20%22New%20Category%22%3A3%2C%20%0D%20%20%20%20%20%20%20%20nativeFocus%3A3%2C%20%0D%20%20%20%20%20%20%20%20RPCManager%3A5%2C%20%0D%20%20%20%20%20%20%20%20RPCManagerResponse%3A5%2C%20%0D%20%20%20%20%20%20%20%20draws%3A3%2C%20
    %0D%20%20%20%20%20%20%20%20redraws%3A3%2C%20%0D%20%20%20%20%20%20%20%20scrolling%3A3%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20trackRPC%3Atrue%0D%7D
    2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: pragma:no-cache
    2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - Header Name:Value pair: cache-control:no-cache
    2012-10-15 19:42:30,300 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - session exists: 43099540270E96CA29D168BB9D6D28842012-10-15 19:42:30,301 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,300 [http-0.0.0.0-8080-3] DEBUG com.isomorphic.servlet.IDACall - remote user: null2012-10-15 19:42:30,301 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,301 [http-0.0.0.0-8080-3] INFO  com.isomorphic.servlet.RequestContext - URL: '/fpo/fpo/sc/IDACall', User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0.1': Moz (Gecko) with Accept-Encoding header
    2012-10-15 19:42:30,301 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,301 [http-0.0.0.0-8080-3] WARN  com.isomorphic.rpc.RPCManager - Detected zero-length IDA transaction, asking client to retry.
    2012-10-15 19:42:30,301 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,301 [http-0.0.0.0-8080-3] WARN  com.isomorphic.rpc.RPCManager - Outputting extra debug information:
    2012-10-15 19:42:30,301 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,301 [http-0.0.0.0-8080-3] WARN  com.isomorphic.rpc.RPCManager - Cookies:
    2012-10-15 19:42:30,301 INFO  [STDOUT] (http-0.0.0.0-8080-3) Name: 'JSESSIONID', value: '43099540270E96CA29D168BB9D6D2884', domain: 'null', path: 'null', maxAge: '-1', isSecure: 'false'
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) Name: 'GLog', value: '%7B%0D%20%20%20%20left%3A38%2C%20%0D%20%20%20%20top%3A527%2C%20%0D%20%20%20%20width%3A881%2C%20%0D%20%20%20%20height%3A971%2C%20%0D%20%20%20%20p
    riorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%2C%20%0D%20%20%20%20%20%20%20%20%22New%20Category%22%3A3%2C%20%0D%20%20%20%20%20%20%20%20nativeFocus%3A3%2C%20%0D%20%20%20%20%20%20%20%20RPCManager%3A5%2C%20%0D%20%20%20%2
    0%20%20%20%20RPCManagerResponse%3A5%2C%20%0D%20%20%20%20%20%20%20%20draws%3A3%2C%20%0D%20%20%20%20%20%20%20%20redraws%3A3%2C%20%0D%20%20%20%20%20%20%20%20scrolling%3A3%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2
    C%20%0D%20%20%20%20trackRPC%3Atrue%0D%7D', domain: 'null', path: 'null', maxAge: '-1', isSecure: 'false'
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,302 [http-0.0.0.0-8080-3] WARN  com.isomorphic.rpc.RPCManager - Client HTTP Headers:
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) host: localhost:8080
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0.12012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.82012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) accept-language: en-us,en;q=0.52012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) accept-encoding: gzip, deflate
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) connection: keep-alive
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) content-type: application/x-www-form-urlencoded; charset=UTF-8
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) referer: http://localhost:8080/fpo/Main.html
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) content-length: 2158634
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) cookie: JSESSIONID=43099540270E96CA29D168BB9D6D2884; GLog=%7B%0D%20%20%20%20left%3A38%2C%20%0D%20%20%20%20top%3A527%2C%20%0D%20%20%20%20width%3A881%2C%20%0D%20%20%20%20height%3A971%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%2C%20%0D%20%20%20%20%20%20%20%20%22New%20Category%22%3A3%2C%20%0D%20%20%20%20%20%20%20%20nativeFocus%3A3%2C%20%0D%20%20%20%20%20%20%20%20RPCManager%3A5%2C%20%0D%20%20%20%20%20%20%20%20RPCManagerResponse%3A5%2C%20%0D%20%20%20%20%20%20%20%20draws%3A3%2C%20%0D%20%20%20%20%20%20%20%20redraws%3A3%2C%20%0D%20%20%20%20%20%20%20%20scrolling%3A3%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20trackRPC%3Atrue%0D%7D
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) pragma: no-cache
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) cache-control: no-cache
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) 2012-10-15 13:42:30,302 [http-0.0.0.0-8080-3] WARN  com.isomorphic.rpc.RPCManager - {
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3)     isc_rpc:"1",
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3)     isc_v:"SNAPSHOT_v8.3d_2012-10-01",
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3)     isc_xhr:"1"
    2012-10-15 19:42:30,302 INFO  [STDOUT] (http-0.0.0.0-8080-3) }
    Notice the warning in there:
    WARN com.isomorphic.rpc.RPCManager - Detected zero-length IDA transaction, asking client to retry.

    This isn't outputted when the request size is less than about 2mb.

    Any ideas how to fix this?

    I'm using the EE nightly build from 10/1/2012: SNAPSHOT_v8.3d_2012-10-01. The browser is Firefox 13.0.1 on MacOSX.

    Thanks,
    Chris

    #2
    This suggests that whatever server you're testing with is rejecting posts over a certain size - look for a property that controls this.

    Comment


      #3
      That was it, jboss was rejecting posts over 2mb.

      Thanks!

      Comment


        #4
        Hi cjustice,

        can you share your solution for JBoss? JBoss version 5.1 here.

        I was trying with java option:
        Code:
        org.mortbay.http.HttpRequest.maxFormContentSize=-1
        but still run into the problem :/


        many thanks,
        Last edited by levi; 21 Nov 2012, 03:31.

        Comment


          #5
          In case someone is wondering (like we where), the fix is as follows:

          Edit the server.xml file in the <JBoss deploy>/jboss-web.deployer folder and search for the <connector> tag. Add the maxPostSize=6291456 property.
          A connector tag looks like this:
          <Connector
          port="8080"
          address="${jboss.bind.address}"
          maxThreads="250"
          maxHttpHeaderSize="8192"
          emptySessionPath="true" protocol="HTTP/1.1"
          enableLookups="false"
          redirectPort="8443"
          acceptCount="100"
          connectionTimeout="20000"
          disableUploadTimeout="true"
          maxPostSize=-1
          />

          Comment


            #6
            As hin3x said, the server.xml file in your jboss deploy/jbossweb.sar file needs the Connector tag modified to add the maxPostPropertySize attribute. We set its value to 0, so that no limit was enforced:

            maxPostSize="0"

            Setting it to a concrete value such as 6291456 would be beneficial as well.

            Comment

            Working...
            X