Wednesday, October 29, 2025

APEX (with ORDS) applications error with "Too Many requests Http Status code:429"

 The APEX is installed and configured with ORDS, when accessing APEX applications, the following erro occures,
    Too Many requests
      Http Status code: 429

     Request ID: o9U3yshYc10iRdjSwRRAmg
  Request Timestamp: 2025-10-29T16:49:31.451274Z

The Pool named: |default|lo| reached the maximum ORDS connections.
If ORDS is running in standalone mode, the ords log/output file can be found from current working directory or ords configuration directory. If the ords.war is configured as WebLogic server with name ords, output file ords.out will be found in directory
 <WebLogic_home>/user_projects/domains/base_domain/servers/ords/logs
In ords.out file, the following message appears:
2025-10-29T16:49:29.603Z SEVERE      *** Error: Could not obtain a database connection because all connections in the pool: |default|lo| were in use. Borrowed Connections: 10 Available Connections: 0 Maximum Connections: 10 ***
<Oct 29, 2025, 12:49:29,603 PM Eastern Daylight Time> <Error> <oracle.dbtools.rest> <BEA-000000> <*** Error: Could not obtain a database connection because all connections in the pool: |default|lo| were in use. Borrowed Connections: 10 Available Connections: 0 Maximum Connections: 10 ***>
2025-10-29T16:49:34.445Z SEVERE      *** Error: Could not obtain a database connection because all connections in the pool: |default|lo| were in use. Borrowed Connections: 10 Available Connections: 0 Maximum Connections: 10 ***
<Oct 29, 2025, 12:49:34,445 PM Eastern Daylight Time> <Error> <oracle.dbtools.rest> <BEA-000000> <*** Error: Could not obtain a database connection because all connections in the pool: |default|lo| were in use. Borrowed Connections: 10 Available Connections: 0 Maximum Connections: 10 ***>
2025-10-29T16:49:34.959Z SEVERE      *** Error: Could not obtain a database connection because all connections in the pool: |default|lo| were in use. Borrowed Connections: 10 Available Connections: 0 Maximum Connections: 10 ***
<Oct 29, 2025, 12:49:34,959 PM Eastern Daylight Time> <Error> <oracle.dbtools.rest> <BEA-000000> <*** Error: Could not obtain a database connection because all connections in the pool: |default|lo| were in use. Borrowed Connections: 10 Available Connections: 0 Maximum Connections: 10 ***>
Cause:

ORDS maximum pool connection (jdbc.MaxLimit) is using the default value (10) or configured with small values and it is not enough for the applications demand. It is not the number of concurrent users but current connections.  If the application is running long queries, the connections are kept open by a user, this left an idle session and the connection is not released for 15 mins by default.

If a report with a slow SQL query is executed, and the end user grows impatient and clicks reload in their browser 9 more times, all 10 sessions will be busy.

If there is not enough memory for ORDS to run and get: java.lang.OutOfMemoryError: GC overhead limit exceeded

Solution:

Note: different version of ORDS may need different way to fix the issue. Here, ORDS is 24.3.

1. Verify current value of jdbc.MaxLimit with command
   <ords-product_folder>/bin/ords --config <ords_config_folder> config get jdbc.MaxLimit
For example,
[oracle@host01]$ /ords/24.3.0/bin/ords --config /ords/config config get jdbc.MaxLimit

ORDS: Release 24.3 Production on Wed Oct 29 20:58:59 2025

Copyright (c) 2010, 2025, Oracle.

Configuration:
  /ords/config

Cannot get setting jdbc.MaxLimit because the setting is not found in database pool default located at /ords/config/databases/default
Note: The value is saved as <entry key="jdbc.MaxLimit"> in /ords/config/databases/default/pool.xml. Therefore, you can directly view this text file.

2. Change value of jdbc.MaxLimit with command
   <ords-product_folder>/bin/ords --config <ords_config_folder> config set jdbc.MaxLimit <number_of_connections>
For example,
[oracle@host01]$ /ords/24.3.0/bin/ords --config /ords/config config set jdbc.MaxLimit 100

ORDS: Release 24.3 Production on Wed Oct 29 20:59:48 2025

Copyright (c) 2010, 2025, Oracle.

Configuration:
  /ords/config

The setting named: jdbc.MaxLimit was set to: 100 in configuration: default
It can also be manually set by adding following line to file /ords/config/databases/default/pool.xml
<entry key="jdbc.MaxLimit">100</entry>

3. Restart ords (for standalone) or WebLogic server (for ORDS configured with WebLogic)

No comments: