Hi, we have a Windows Service application that uses MS DTC with the Oracle.DataAccess code and MSMQ (so we get promoted transactions) with Oracle.DataAccess being used by NHibernate.
We have noticed that over a period of time the memory usage for our process increases indicating a memory leak somewhere... to investigate we obtained a dump file from the process and tried using WinDbg to have a look at what was happening; when we did this we noticed a lot of instances of Oracle.DataAccess.Client.OracleResourceHolder hanging around. Here's the tail of the result of our "!dumphear -stat" command:
From this we can see almost half a million OracleResourceHolder instances, which seems somewhat excessive. Having looked at a few of them with WinDbg we saw they all shared the same output (apologies for the formatting):
From what we can tell (we haven't used WinDbg that much so we may be wrong - please feel free to correct if we totally read this the wrong way) it looks like an event handler from the connection pool is keeping a reference to the resource holder.
We know that the distributed transaction is completing as the data is going into the database. Is there anything we could do to mitigate this, have we been doing something wrong in our code, misinterpretted the WinDbg output, or is this a bug?