For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
Sitting with something that I'm trying to figure out, and I'm hoping someone has come across this before and found a solution. I have a .Net Core application doing threaded work. The application connects to multiple Oracle instances to execute some queries. I have noticed that the threads created by Oracle.MangedDataAccess.Core is not being disposed of. The application should be using around 30-40 threads. But leaving it to run for a bit, it ends up with hundreds of threads (950). I use a helper method I wrote to create threads and is being used in another service without issue. The threads I am creating in code, is closing as expected. But these external code threads are not being closed. The other database types like Microsoft SQL and IBM DB2 is working as expected (using shared code except when testing a connection or getting data). Here is a screenshot of the threads (last column points to an internal method within theOracle.MangedDataAccess.dll: I'm not sure if I'm missing anything here, but it does seem like threads are being created and not disposed correctly. I use two methods to create connections. One to test and see if the connection is valid, and the other to get a `DataSet`. TestConnection: And Data: I also added connection.Close and connection.Dispose just to make sure, and no luck.
Oracle.MangedDataAccess.Core
external code
Microsoft SQL
IBM DB2
Oracle.MangedDataAccess.dll
connection.Close
connection.Dispose