Has anyone noticed the Rollback command showing up in dbmonitor when closing connections? To test this I setup a simple console app that connects and immediately disconnects from the oracle server. When I look in dbmonitor I see Rollback as a command that was executed.
Why does rollback show up when I'm not rolling anything back?
Rollback displayed in dbmonitor
Re: Rollback displayed in dbmonitor
Please refer to http://www.devart.com/dotconnect/oracle ... story.html:
6.50.244 11-Nov-11
Behaviour is changed: pending operations on a connection are rolled back before returning the connection to pool
This behaviour is applied only when pooling is used. If you include the "Pooling=false;" option to your connection string, there will be no rollback.
6.50.244 11-Nov-11
Behaviour is changed: pending operations on a connection are rolled back before returning the connection to pool
This behaviour is applied only when pooling is used. If you include the "Pooling=false;" option to your connection string, there will be no rollback.
Re: Rollback displayed in dbmonitor
Ok, thanks for the response!
Just curious...if I open and then close the connection, what operation is pending that needs to be rolled back??
Just curious...if I open and then close the connection, what operation is pending that needs to be rolled back??
Re: Rollback displayed in dbmonitor
We do not count all the commands which are executed on the current connection (because it can be even a trigger on a log on which changes data). That's why we always do a roll back when returning connection to the pool.dhoenig wrote:if I open and then close the connection, what operation is pending that needs to be rolled back??
Re: Rollback displayed in dbmonitor
I just stumbled upon this and am very disappointed.
What I have is several EF calls like context.Table.Where(...).ToList()...
And after each I have same thing over and over again - Rollback, Connection closed, Connection is returned to pool.
Min rollback timing is 65ms (up to 200 at some point). All are after select.
If I have thousand selects a minute then I will have to wait extra 65 sec on your rollbacks.
This is unacceptable.
You have to do something about it.. Oracle is about performance. Those users who are still using it are there mostly because of performance.. Wasting 100ms after each request just because "you don't count" something is wrong.
If I switch off pooling - it incurs twice as much performance penalty - close connection takes about same time as a Rollback, but then there is something called Disconnect which takes exactly same time as closing connection.. What are you disconnecting exactly?
What options do I have ?
Is this even an enterprise class solution? I thought it is but I was wrong.
What I have is several EF calls like context.Table.Where(...).ToList()...
And after each I have same thing over and over again - Rollback, Connection closed, Connection is returned to pool.
Min rollback timing is 65ms (up to 200 at some point). All are after select.
If I have thousand selects a minute then I will have to wait extra 65 sec on your rollbacks.
This is unacceptable.
You have to do something about it.. Oracle is about performance. Those users who are still using it are there mostly because of performance.. Wasting 100ms after each request just because "you don't count" something is wrong.
If I switch off pooling - it incurs twice as much performance penalty - close connection takes about same time as a Rollback, but then there is something called Disconnect which takes exactly same time as closing connection.. What are you disconnecting exactly?
What options do I have ?
Is this even an enterprise class solution? I thought it is but I was wrong.
Re: Rollback displayed in dbmonitor
As a workaround, you can open/close connections manually. Please open the connection used by Entity Framework context in the following way (depending on the template used in your model):
a) ObjectContext:
var conn = (MyObjectContext.Connection as System.Data.EntityClient.EntityConnection).StoreConnection;
conn.Open();
...
conn.Close();
b) DbContext:
var conn = (((IObjectContextAdapter)MyDbContext).ObjectContext.Connection as System.Data.EntityClient.EntityConnection).StoreConnection;
conn.Open();
...
conn.Close();
This will make Entity Framework not to open/close connection automatically during every interoperation with a database. If connection is opened manually, it remains in the opened state until user closes it himself.
a) ObjectContext:
var conn = (MyObjectContext.Connection as System.Data.EntityClient.EntityConnection).StoreConnection;
conn.Open();
...
conn.Close();
b) DbContext:
var conn = (((IObjectContextAdapter)MyDbContext).ObjectContext.Connection as System.Data.EntityClient.EntityConnection).StoreConnection;
conn.Open();
...
conn.Close();
This will make Entity Framework not to open/close connection automatically during every interoperation with a database. If connection is opened manually, it remains in the opened state until user closes it himself.