3 Replies Latest reply: Nov 11, 2008 1:24 PM by Peter Johnson RSS

ORA-02396: exceeded maximum idle time, please connect again.

Ed Schneider Newbie

When the application is idle for several hours, the next request throws the following error: ORA-02396: exceeded maximum idle time, please connect again.

The DBAs state that there is no idle timeout on the database.

I'm using JBoss 4.0.1 and jdbc:oracle:thin.

I set the local-tx-datasource to <idle-timeout-minutes>0</idle-timeout-minutes>, but the app is still getting the idle time error. I have to restart JBoss for the app to start working again.

Any thoughts?

Thanks!

  • 1. Re: ORA-02396: exceeded maximum idle time, please connect ag
    jaikiran pai Master

     

    "ejsdeveloper" wrote:
    When the application is idle for several hours, the next request throws the following error: ORA-02396: exceeded maximum idle time, please connect again.

    The DBAs state that there is no idle timeout on the database.




    Since the error message (ORA-02396) is from the database, the database server is probably set for idle timeout.

    I set the local-tx-datasource to <idle-timeout-minutes>0</idle-timeout-minutes>, but the app is still getting the idle time error.


    The idle-timeout-minutes is the time after which a thread cleans up any idle connections in the pool. Setting it to 0 i think is going to disable it. I would suggest to set it to around 20 minutes or any other appropriate value.


  • 2. Re: ORA-02396: exceeded maximum idle time, please connect ag
    Ed Schneider Newbie

    Our DBAs state that the idle timeout is currently not set on our database.

    Our JBoss application might not get any requests for several days. How do I force JBoss to stay connected to Oracle indefinitely and not receive any 'exceeded maximum idle time messages'?

  • 3. Re: ORA-02396: exceeded maximum idle time, please connect ag
    Peter Johnson Master

    You could write a simple service that does a query every so often to keep the connection refreshed.

    But there must be timeout either on the database (a default one, or perhaps in the JDBC driver) because the error message (ORA-02396) is an Oracle error message - JBossAS would never generate an Oracle error. If it is the driver, there should be a configuration option that you can set to change the driver timeout.