7 Replies Latest reply on Oct 5, 2010 5:23 PM by Udo

    Apex listener connection reset issues - Weblogic Server


      We are experiencing connection reset issues with apex listener 1.0 every time the server stays without an active connection for some time (Error : HTTP 500 on the browser when we try to load the application - After the error, we refresh the page and everything is back to normal.)

      We have other java applications that are deploy on this server and we don't have any "connection reset" problem on those applications.

      Is there a parameter that can be initialize in the apexConfig.xml so that we don't have this kind of error every once a will. Or is there another solution to correct this problem.

      Here is what we have in the server log when this error happens:

      ==== doGet()====

      isValidRequest(), procedure name: <f>


      *** Found procedure in cache: f*** Total number of arguments: 12_init_: # header
      declare nm owa.vc_arr := ?;
      vl owa.vc_arr := ?;
      owa.init_cgi_env( ?, nm, vl );
      htp.init; htp.HTBUF_LEN := 63;
      ? := sys_context('USERENV','SID');
      INIT FAILED:Exception d'E/S: Connection reset
      nm(1) := 'Accept';
      vl(1) := 'image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwa
      ve-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/m
      sword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-x
      psdocument, application/xaml+xml, */*';
      nm(2) := 'User-Agent';
      vl(2) := 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.5
      ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; InfoPath.2; .NET CLR 3.0.45
      06.2152; .NET CLR 3.5.30729)';
      nm(3) := 'Accept-Encoding';
      vl(3) := 'gzip, deflate';
      nm(4) := 'Cookie';
      vl(4) := 'EnapAlert=datealert=';
      nm(5) := 'Host';
      vl(5) := 'XXXXXXXXXXXX';
      nm(6) := 'Connection';
      vl(6) := 'Keep-Alive';
      nm(7) := 'Accept-Language';
      vl(7) := 'fr-ca';
      nm(8) := 'APEX_LISTENER_VERSION';
      vl(8) := '';
      nm(9) := 'DAD_NAME';
      vl(9) := '';
      nm(10) := 'DOC_ACCESS_PATH';
      vl(10) := '';
      nm(11) := 'DOCUMENT_TABLE';
      vl(11) := '';
      nm(12) := 'GATEWAY_IVERSION';
      vl(12) := '3';
      nm(13) := 'GATEWAY_INTERFACE';
      vl(13) := 'CGI/1.1';
      nm(14) := 'HTTP_ACCEPT';
      vl(14) := 'image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockw
      ave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/
      msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-
      xpsdocument, application/xaml+xml, */*';
      nm(15) := 'HTTP_ACCEPT_ENCODING';
      vl(15) := 'gzip, deflate';
      nm(16) := 'HTTP_ACCEPT_LANGUAGE';
      vl(16) := 'fr-ca';
      nm(17) := 'HTTP_ACCEPT_CHARSET';
      vl(17) := 'null';
      nm(18) := 'HTTP_COOKIE';
      vl(18) := 'EnapAlert=datealert=';
      nm(19) := 'HTTP_IF_MODIFIED_SINCE';
      vl(19) := 'null';
      nm(20) := 'HTTP_IF_NONE_MATCH';
      vl(20) := 'null';
      nm(21) := 'HTTP_HOST';
      vl(21) := 'XXXXXXXXXXX:443';
      nm(22) := 'HTTP_ORACLE_ECID';
      vl(22) := '';
      nm(23) := 'HTTP_PORT';
      vl(23) := '443';
      nm(24) := 'HTTP_REFERER';
      vl(24) := 'null';
      nm(25) := 'HTTP_USER_AGENT';
      vl(25) := 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.
      5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; InfoPath.2; .NET CLR 3.0.4
      506.2152; .NET CLR 3.5.30729)';
      nm(26) := 'PATH_ALIAS';
      vl(26) := ' ';
      nm(27) := 'PATH_INFO';
      vl(27) := '/f';
      nm(28) := 'PLSQL_GATEWAY';
      vl(28) := 'WebDb';
      nm(29) := 'QUERY_STRING';
      vl(29) := 'p=119:1';
      nm(30) := 'REMOTE_ADDR';
      vl(30) := 'XXX.XXX.XXX.XXX';
      nm(31) := 'REMOTE_USER';
      vl(31) := 'APEX_PUBLIC_USER';
      nm(32) := 'REQUEST_CHARSET';
      vl(32) := 'AL32UTF8';
      nm(33) := 'REQUEST_IANA_CHARSET';
      vl(33) := 'UTF-8';
      nm(34) := 'REQUEST_METHOD';
      vl(34) := 'GET';
      nm(35) := 'REQUEST_PROTOCOL';
      vl(35) := '/1.1';
      nm(36) := 'SCRIPT_NAME';
      vl(36) := '/apex';
      nm(37) := 'SCRIPT_PREFIX';
      vl(37) := '';
      nm(38) := 'SERVER_NAME';
      vl(38) := 'XXXXXXXX';
      nm(39) := 'SERVER_PORT';
      vl(39) := '443';
      nm(40) := 'SERVER_PROTOCOL';
      vl(40) := 'HTTP/1.1';
      nm(41) := 'SERVER_SOFTWARE';
      vl(41) := 'Mod-Apex';
      nm(42) := 'WEB_AUTHENT_PREFIX';
      vl(42) := ' ';

      Exception d'E/S: Connection reset
      Connexion interrompue

      Got results length:NULL


      Here is what we have in the apexListener error log :


      --- 10-07-24 09:29 ( 50 Minutes 17 Seconds Ago ) ---
      Exception d'E/S: Connection reset


      Thanks for your help...
        • 1. Re: Apex listener connection reset issues - Weblogic Server
          Kris Rice-Oracle
          This is probably an issue with your database and some resource limiting on the connections causing the timeouts.
          • 2. Re: Apex listener connection reset issues - Weblogic Server
            Has anyone come up with a fix for this, or something else to try???

            We are having the same issue, every morning when I access apex (and various times of the day), I will get the "Server Unavailable" error. I have looked in the logs, and I am not finding the error that was listed above. According to our WebLogic admin, apex has it's own logging system and it is returning the following error:
            --- 9/13/10 7:38 AM ( 5 Hours 22 Minutes 25 Seconds Ago ) ---
            Io exception: Connection reset by peer: socket write error

            Our DBA tried updating the profile with a 24-hour limit on the APEX_PUBLIC_USER account, but that hasn't seemed to fix the problem. We are running Apex 4.01 on Oracle 11gR2 with WebLogic 11g.

            • 3. Re: Apex listener connection reset issues - Weblogic Server
              Hi Michelle,

              how did you configure your JDBC-connection in the Listener's Administration? You could try to reduce the timeouts for the Listener so it drops unused connections faster.
              Are there any firewalls/routers/proxies between your WebLogic-server and the database that may cause a connection to timeout?
              It seems the Listener doesn't know it is cut and tries to (re)use it, but apparently this fails. Reducing the timeout to a value less than the timeout of intermediate systems might help to prevent using dead conncections.

              @Kris: Is there any probing of the connections status before the connection is used again?

              • 4. Re: Apex listener connection reset issues - Weblogic Server
                Unfortunately, I can't see anything about the jdbc connection of the listener. But, since the post above, we now think it is a problem in the firewall. The firewall between the database and weblogic is cutting the connection after 2 hours of inactivity. I may have our web administrator look into setting the timeout of the listener to a time period of less than 2 hours and see if that fixes the problem. Thanks for your help.

                • 5. Re: Apex listener connection reset issues - Weblogic Server
                  Hi Michelle,

                  the JDBC connection parameters regarding timeout can be configured via the Listener Admin (<your_webserver_base_url>/<your_apex_listener_context>/listenerAdmin, e.g. http://localhost:8080/apex/listenerAdmin) when you expand "JDBC Settings" on the connection tab. You can also change them by editing the apex-config.xml that belongs to your deployment.

                  • 6. Re: Apex listener connection reset issues - Weblogic Server
                    We set out timeout to a lower value then the firewall timeout, but this did not fix the problem, it may have made it worse. Any other suggestions?

                    • 7. Re: Apex listener connection reset issues - Weblogic Server
                      Have you set both "AbandonedConnectionTimeout" and "InactivityTimeout" to an appropriate level? The first parameter has to be lower than the second one.
                      If that's the case, there is a problem in the handling for pooling, either in the Listener or the WLS.
                      You could then try to set the firewall timeout and the JDBC-timeouts high enough to never see the timeout.