Forum Stats

  • 3,750,403 Users
  • 2,250,174 Discussions
  • 7,866,966 Comments

Discussions

db.invalidPoolTimeout: Regression behavior

We are using the 19.4.6 version of ORDS currently in production and want to move to the latest one 21.2.4.

We are facing to a different behavior when ORDS start and database is not yet ready, the connection is never resumed and stand with the 404 configuration mapping error.

According some reference we don't have to restart ORDS when the database is down.

Does ORDS Require a Restart When the Database Has Been Shutdown and Restarted? (Doc ID 2630478.1)

That's correct but ONLY if the connection was attempt at startup time.

Easy step to reproduce:

1. Set the retry time value in a lowest value for testing only

<entry key="db.invalidPoolTimeout">1m</entry>

2. Shutdown the configured database

3. Start ORDS

4. Invoke one Rest ressource

You will receive a 404 error have in the log : (where xx is the configured pool)

The pool named: |xx|pu| is invalid and will be ignored: ORDS was unable to make a connection to the database. This can occur if the database is unavailable, the maximum number of sessions has been reached or the pool is not correctly configured. The connection pool named: |xx|pu| had the following error(s): ORA-01033: ORACLE initialization or shutdown in progress

5. Start the database

6. Wait 1 or 2 minutes

7. Invoke again one Rest ressource

You still receive the 404 error and never resume.

@thatJeffSmith-Oracle, this was already identified on your side ?

Answers

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 7,906 Employee

    I've tested this just the other day...had my db down, brought it up, made a request...ORDS came 'right back up' - that is, the connections to the pool were restarted.

  • PeeZu
    PeeZu Member Posts: 26 Blue Ribbon

    Weird, I can reproduce the case any time with version greater than 19.4.6, here is my config:

    <entry key="db.connectionType">customURL</entry>
    <entry key="db.customURL">jdbc:oracle:thin:@EASYCONNECT_STRING</entry>
    <entry key="db.invalidPoolTimeout">1m</entry>
    <entry key="debug.printDebugToScreen">true</entry>
    <entry key="error.keepErrorMessages">true</entry>
    <entry key="log.logging">true</entry>
    <entry key="feature.sdw">false</entry>
    <entry key="restEnabledSql.active">false</entry>
    <entry key="instance.api.enabled">false</entry>
    <entry key="security.verifySSL">false</entry>
    

    Be aware about the sequence:

    1. stop ORDS
    2. stop database
    3. start ORDS
    4. made one or more request, got 404
    5. start database
    6. made one or more request, got 404
  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 7,906 Employee

    Not sure waiting 1-2 minutes is long enough...I'll check with dev to see what the exact login in play is.

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 7,906 Employee

    I believe the inactivity timeout defaults to 1800 seconds/30 minutes

  • PeeZu
    PeeZu Member Posts: 26 Blue Ribbon

    @thatJeffSmith-Oracle, first thanks to taking into account this issue.

    I think that I've found the way to reproduce on your side, actually one configuration information was missing:

    The reported behavior only occurs when we use the: url-mapping.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <pool-config
        xmlns="http://xmlns.oracle.com/apex/pool-config">
        <pool name="apex" base-path="/foo" schema-name="YOUR_DB_SCHEMA" updated="2021-10-13T07:24:22.354Z"/>
    </pool-config>
    

    Try to configure your environment with that and follow the steps.

    To sum up:

    With a "basic" configuration, the database pool is recovered, after the db.invalidPoolTimeout delay, if the database was not available at ORDS startup time.

    This is not the case with the url-mapping configuration, database pool is never recovered, even after the 1800 secs.

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 7,906 Employee

    that would be a pretty bad bug, can you open a SR with My Oracle Support?

  • PeeZu
    PeeZu Member Posts: 26 Blue Ribbon

    Yep, just done.

    thatJeffSmith-Oracle