Code snippet not there with me.
Issue happening is
When we hit a application url it works some time,but some times it gives this exception
could not allocate new oci handle of type statement.
.net core and oracle is used. ado.net is used to connect to the database.
I do not have application. Have been given this error to research.

Tuhin PaulPosted Jan 16, 2025, 5:36 PM
Think of this as you are working on a web application that connects to an Oracle database. Every time a user makes a request to the application, it establishes a connection to the Oracle database to retrieve or insert data. Under heavy load, after multiple requests, users sometimes get the following exception:
This exception occurs because the application has too many open database connections or cursors that haven't been disposed of correctly.
basic example in which the issue might arise due to improper connection management:
The conn.Close() in the finally block is missing, which leads to open connections being left around. OracleCommand and OracleDataReader are not disposed of, leading to unfreed resources.
Tuhin PaulPosted Jan 16, 2025, 5:20 PM
I think this issue often arises when:
Aniket NarvankarPosted Jan 14, 2025, 9:02 AM
When app pool is refresh it works
Muhanad YounisPosted Jan 13, 2025, 1:31 PM
Without any more information,, it's hard to understand the issue. It might be because the connection is not closed!!! But again, this is an assumption that we have no support for!