ORDS returns 403 when simultaneously making multiple queries to multiple endpoints with pooled ORDS conf.
I can reproduce error for example with curl --location '.../ords/db1/..' & curl --location '.../ords/db2/..' & .. etc. interleaved db1 and db2 urls about 4 times. Sometimes error does not appear when testing multiple times but by waiting between test bursts about 30 seconds then almost always the error appears.
But this really needs to be simultaneous, for example curl queries with && (not parallel execution but still fast but not sub millisecond level fast) do not produce error, only & does. Also just querying /db1 or /db1 separately multiple times with the fast curl & curl & etc. does not reproduce error ever.
ORDS conf is pooled as one ORDS in Tomcat but with three PDB database endpoints like /ords, /ords/db1 and /ords/db2
Testing with 2 endpoints that both have almost identical ORDS.source_type_plsql type handlers that call a procedure in corresponding db1 or db2 database schemas (DB1_SCHEMA.TEST_PROC in db1 handler, DB2_SCHEMA.TEST_PROC in db2 handler).
I have suspicion that in some cases something inside ORDS tries to parse wrong pool half way because in catalina log there is error where GET url is /ords/db1 but it states it is caused by DB2_SCHEMA.TEST_PROC. Thing is DB2_SCHEMA.TEST_PROC is only defined in different database db2 so how does get against /ords/db1 go to wrong database.
When queries do not come simultaneously interleaved then every GET arrives in correct database - this implies the conf files should be fine.
Currently same problem remains when updated to ORDS 24.4 and Tomcat 9.0.102.
Relevant error in catalina log file:
INFO [https-jsse-nio-1234-exec-2] oracle.dbtools.common.logging.JDKLogSink.record <oQp3hsQVgrksK0_j2YfvWw> GET ip_redacted /ords/db1/redacted 403 The request could not be processed because a function or procedure referenced by the PL/SQL statement being evaluated is not accessible or does not exist
IdentifierMustBeDeclaredException [statusCode=403, logLevel=INFO, reasons=[The request could not be processed because a function or procedure referenced by the PL/SQL statement being evaluated is not accessible or does not exist]]
at oracle.dbtools.rest.resource.generator.error.ResourceGeneratorErrors.plsqlCompileError(ResourceGeneratorErrors.java:82)
at oracle.dbtools.rest.resource.generator.error.ResourceGeneratorErrors.handle(ResourceGeneratorErrors.java:34)
at oracle.dbtools.rest.resource.generator.plsql.PLSQLGenerator.service(PLSQLGenerator.java:122)
at oracle.dbtools.rest.resource.generator.ResourceGeneratorsProvider.generate(ResourceGeneratorsProvider.java:100)
at oracle.dbtools.rest.resource.modules.ModulesDispatcherDelegate.service(ModulesDispatcherDelegate.java:165)
at oracle.dbtools.rest.resource.modules.ModulesDispatcherDelegate.service(ModulesDispatcherDelegate.java:65)
at oracle.dbtools.rest.resource.jdbc.JDBCResourceDispatcher.service(JDBCResourceDispatcher.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
...
Caused by: java.sql.SQLException: ORA-06550: line 15, column 1:
PLS-00201: identifier 'DB2_SCHEMA.TEST_PROC' must be declared