2 Replies Latest reply: Aug 14, 2012 12:18 AM by Habib RSS

    IO Error: Socket closed

    Habib
      Hi

      I am using Apex 4.1.1 with Oracle 11G XE and Listener Version:1.1.2.131.15.23 (Standalone mode) on Centos 6.2. I know some people suggest that Standalone mode is not for production but this is a small deployment and I have seen Standalone mode working for this kind of deployment.

      I am using NGINX as reverse proxy to Apex.

      In general Apex runs very good but some times user complain that they get Bad Gateway 502 error. When they refresh the page everything starts working fine. I have checked Listener logs and found following errors:
      6 error messages
      
      --- 8/8/12 4:02 PM ( 1 Hour 33 Minutes 15 Seconds  Ago ) ---
       IO Error: Socket closed
      
      --- 8/8/12 4:02 PM ( 1 Hour 33 Minutes 15 Seconds  Ago ) ---
       IO Error: Socket closed
      
      --- 8/8/12 4:02 PM ( 1 Hour 33 Minutes 15 Seconds  Ago ) ---
       IO Error: Socket closed
      
      --- 8/8/12 4:02 PM ( 1 Hour 33 Minutes 15 Seconds  Ago ) ---
       IO Error: Socket closed
      
      --- 8/8/12 4:01 PM ( 1 Hour 34 Minutes 41 Seconds  Ago ) ---
       IO Error: Socket closed
      
      --- 8/8/12 1:40 PM ( 3 Hours 55 Minutes 3 Seconds  Ago ) ---
       IO Error: Socket closed
      I will be thankful if someone can help me to find a solution to this issue.

      Habib
        • 1. Re: IO Error: Socket closed
          Udo
          Hi Habib,

          sounds like your database is closing the connections while APEX Listener still has them in its pool. The error will probably disappear as soon as all (dropped) connections in the pool have been reset.
          Could you post your APEX Listener JDBC settings?
          Note that in 1.1.3 the default value for connection reuse count has been reduced to address issues like that...
          And of course, as soon as you restart your database, you'll also have to restart APEX Listener. And if you don't run database and APEX Listener on the same host (though it sounds as if you do that), any reset of network connections in between (e.g. reboot of a switch or router) will probably also cause the connections to be dropped.

          -Udo
          • 2. Re: IO Error: Socket closed
            Habib
            Hi Udo

            I noticed that I got the mentioned error in logs when I changed my DNS and restarted the networking service in Linux. I never got that error again however Bad Gateway was seen several times and no logs were there about that. Then I switched the listener from standalone mode to Glassfish and no bad gateway was seen after that.

            Thanks for your help

            Habib