I have an application that insert and update about 10000 entries into several tables in a OracleDatabase using ODP.net. I've separate the job in block of 100 entries.

At first the application was opening and closing the oracleconnection for each entries. The application was running fine for some blocks of entries but after a while (not always the same) it was just stopping running, it was still using memory but no CPU and no error was thrown. I found out it was when the application was calling the OracleConnection Close method.

I have changed it to open and close and connection at the beginning and the end of the application and everything is fine.

Although the fact that open and close the connection for each entries wasn't the proper way, my question is why it was just stopping at the method Close() of the OracleConnection?

Anyone has an idea?

Thanks in advance.

Views: 32

Reply to This

Replies to This Discussion

I can suggest two reason, both of which I've seen before.

First, if you have a long-running connection affecting a lot of records, it's possible that due to the time (or perhaps something is blocking the insert/update) and the connection pool manager is attempting to re-claim & recycle the connection.

Another one which is very difficult to debug is the possibility that your connections are going though a firewall, and the firewall is dropping long-running connections. If this is the case, you might experience the occasional problem when opening new connection from a pool - it should usable, but fails when you try to open it (I forget the exact symptoms & error messages, as this was a few months back).

Thoroughly relevant info.

Reply to Discussion

RSS

Oracle Jobs in US

© 2024   Created by Maisam Agha.   Powered by

Badges  |  Report an Issue  |  Terms of Service