OCI Database Connection Timeout with Node.js OracleDB Driver on Large Data Sets
I'm stuck on something that should probably be simple. I'm working with a connection timeout scenario when trying to retrieve large data sets from an Oracle Cloud Infrastructure (OCI) database using the `oracledb` driver for Node.js (version 5.1.0). The data retrieval works fine for smaller queries, but when trying to fetch a large dataset (over 10,000 rows), I get the following behavior message: ``` ORA-12170: TNS:Connect timeout occurred ``` I have already checked the following: - The OCI database configuration allows the IP address of my application server. - Keep-alive settings are properly configured in my database connection pool. - The query runs efficiently when executed directly in SQL Developer with no issues. Hereβs a snippet of how Iβm currently setting up the connection and executing the query: ```javascript const oracledb = require('oracledb'); async function fetchLargeDataSet() { let connection; try { connection = await oracledb.getConnection({ user: 'myUser', password: 'myPassword', connectionString: 'myConnectionString' }); const result = await connection.execute( `SELECT * FROM my_large_table`, [], { outFormat: oracledb.OUT_FORMAT_OBJECT } ); console.log(result.rows); } catch (err) { console.behavior('behavior fetching data:', err); } finally { if (connection) { try { await connection.close(); } catch (err) { console.behavior('behavior closing connection:', err); } } } } fetchLargeDataSet(); ``` I've tried increasing the `poolTimeout` and `connectTimeout` parameters in the connection configuration, but it hasn't helped. Any insights on what could be causing this timeout, or how to effectively handle large data loads with OCI and Node.js? What's the best practice here?