TomCat return Temp-table with clob - Forum - OpenEdge Development - Progress Community

TomCat return Temp-table with clob

 Forum

TomCat return Temp-table with clob

This question is not answered
Hi, I have an application and it's connecting to the appserver via Tomcat port 8080 and AIA. I have a temp-table: DEFINE TEMP-TABLE tt-sysfiletransfer NO-UNDO FIELD blobfile AS BLOB. On the appserver: DEFINE OUTPUT PARAMETER TABLE FOR tt-sysfiletransfer. The client crashes when there's more then 1 Mb in the temp-table, So I thought that it had something to do with Tomcat maximum size. Doing the same thing on port 80, IIS -> Tomcat -> AIA, then it workes. In the 'application routing request' of IIS, you need to set the size. I've added: maxPostSize="-1" in the tomcat conf/server.xml, but that doesn't solves my problem. So my question is, is there some parameter in Tomcat that needs to be set so I can transfer more than 1Mb ? Kind regards Bart S.
All Replies
  • I think use “maxSavePostSize” instead of “maxPostSize”.

    Source:

    tomcat.apache.org/.../http.html

    another option is

    There is an RFA - PSC00353298 where there was AIA client crash. In this, it was suggested to set environment variable HTTP_BUFFER_SIZE to high value like 204900 and it worked.

  • Thanks for replying.

    Tried: maxSavePostSize="-1" in the conf/server.xml file, restarted Tomcat, but that didn't solve my problem.

    Then I looked at PSC00353298, so added HTTP_BUFFER_SIZE in the progress.ini file, but that didn't solve my problem either...

    I still find it strange that this works when we go through IIS -> TomCat -> AIA on port 80 and define a Application Routing Request in IIS.

  • what is your tomcat version?

    and how you are setting size in IIS? what is that attribute in IIS?

    could you capture http request/response message in case of client -> tomcat and client -> IIS - > tomcat?

    you can use url interceptor "burp suite" for this. here is the video link to use it

    www.youtube.com/watch

    i am interested to know what is difference between request header of both cases.

  • Hi,

    It's version 9 of TomCat.

    If going throught IIS, then I set in Application Routing Request, the following parameter: 'Response Buffer Threshold (KB)'

  • Hi,

    i found similar attribute in tomcat. to use that attribute, you have use NIO connector.

    attribute is "socket.appWriteBufSize"

    i am not sure whether it will work. try once and let see.

    refer these links:

    tomcat.apache.org/.../http.html

    dzone.com/.../understanding-tomcat-nio

  • Hi,

    Looking in my server.xml file, I saw that the connector is already there (and started -> log files).

       <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"

                  maxThreads="150" SSLEnabled="true">

    There's no "socket.appWriteBufSize" in the XML file, where do I need to place that ?

    I was wondering, I placed the maxSavePostSize="-1" in the following section:

       <Connector port="8080" protocol="HTTP/1.1"

                  connectionTimeout="20000"

                  redirectPort="8443"

          maxSavePostSize="-1" />

       <!-- A "Connector" using the shared thread pool-->

       <!--

       <Connector executor="tomcatThreadPool"

                  port="8080" protocol="HTTP/1.1"

                  connectionTimeout="20000"

                  redirectPort="8443"

          maxSavePostSize="-1" />

    Is that correct ?

  • if you are using 8080 port to connect to tomcat, then modify 8080 connector like this:

    <Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"

                 connectionTimeout="20000"

                 redirectPort="8443"

       socket.appWriteBufSize="64000"

       socket.appReadBufSize="64000"

    />

  • Hi,

    Thanks for helping me out with this.

    I changed the xml file with your suggestion, and then restarted Tomcat.

    Still the same problem, the client crashes...

  • try to increase value in "socket.appWriteBufSize" and "socket.appReadBufSize". the value in byte. use value like 1000000.

  • I've set it to 2000000, and still no luck ...

    The file in the temp-table blob file is 1 586 125 bytes.

  • trim out client/server .p code for problem specific and send me on my email awverma@progress.com.

    i will try to reproduce it on my local.

  • hi,

    following steps done.

    1. created table with provide .df file.

    2. populated table with 3 row. each row have same blob data (.r file you provided).

    3. trim out client/server code for only temp-table as output. Below is the code:

    client code:

    DEFINE TEMP-TABLE tt-sysfiletransfer NO-UNDO
    FIELD sysfiletransfernaam AS CHARACTER LABEL 'Bestandsnaam' FORMAT 'x(40)' INITIAL ''
    FIELD sysfiletransferpad AS CHARACTER LABEL 'sysfiletransferpad' FORMAT 'x(80)' INITIAL ''
    FIELD typefile AS CHARACTER LABEL 'Type file' FORMAT 'x(8)' INITIAL ''
    FIELD blobfile AS BLOB FORMAT 'x(8)'
    FIELD timestamp AS DATETIME LABEL 'Timestamp' FORMAT '99/99/9999 HH:MM:SS.SSS'

    INDEX sysfiletransfernaam sysfiletransferpad.

    DEFINE VARIABLE hWS AS HANDLE NO-UNDO.
    DEFINE VAR picfile AS CHAR.

    CREATE SERVER hWS.
    IF hWS:CONNECT(" -URL localhost:8080/.../Aia THEN
    DO:
    message "connected" view-as alert-box.
    RUN "apchkusernet.p" ON hWS(OUTPUT TABLE tt-sysfiletransfer).
    END.

    FOR EACH tt-sysfiletransfer:
    picfile = tt-sysfiletransfer.sysfiletransfernaam + ".r".
    COPY-LOB tt-sysfiletransfer.blobfile TO FILE picfile.
    DISPLAY tt-sysfiletransfer.sysfiletransfernaam.
    END.

    server code:

    DEFINE TEMP-TABLE tt-sysfiletransfer NO-UNDO
    FIELD sysfiletransfernaam AS CHARACTER LABEL 'Bestandsnaam' FORMAT 'x(40)' INITIAL ''
    FIELD sysfiletransferpad AS CHARACTER LABEL 'sysfiletransferpad' FORMAT 'x(80)' INITIAL ''
    FIELD typefile AS CHARACTER LABEL 'Type file' FORMAT 'x(8)' INITIAL ''
    FIELD blobfile AS BLOB FORMAT 'x(8)'
    FIELD timestamp AS DATETIME LABEL 'Timestamp' FORMAT '99/99/9999 HH:MM:SS.SSS'

    INDEX sysfiletransfernaam sysfiletransferpad.

    DEFINE OUTPUT PARAMETER TABLE FOR tt-sysfiletransfer.

    FOR EACH sysfiletransfer:
    CREATE tt-sysfiletransfer.
    BUFFER-COPY sysfiletransfer TO tt-sysfiletransfer.
    END.

    RETURN.

    4. started tomcat in box (version 7.0.3) having aia deployed.

    5. started appserver.

    6. run the client. RESULT: successfully received the temp-table.

    7. download tomcat version 9.0.0.0 and deployed aia in it.

    8. started tomcat and run client. RESULT: successfully received the temp-table.

    So, i could not get any error for both version of tomcat.

    Note: i did not do any change in server.xml file.

    Thanks,

    Awadhesh 

  • Hi,

    First, thanks for the effort.

    Tried your example on the server, so with '-URL ...localhost...', and indeed, that works.

    Doing exact the same thing from my pc, where localhost, is changed to the public IP-adres of the server, then the client-session crashes....

    So still no luck ...

    Am I correct that IIS has nothing to do with this ?

    Kind regards

    Bart S.

  • IIS act as load balancer for tomcat. So, yes, IIS has nothing to do with this.

    so, you are able to run client on server(localhost) machine but not on remote machine.

    i am suspecting for network issue. just check round trip from remote machine to server. on server side put a simple .p file like return "hello" and call it from client(remote nachine). if this will work, then we will be sure that there is no network issue.

  • Hi,

    Round trip just works fine, from remote client to server with public addres.

    Transferring a file that's about 100Kb big, works also. It's just when I try to transfer a file that is bigger then 1MB

    Kind regards

    Bart S