Page 1 of 1

Problems with dbMonitor and odd timeout errors

Posted: Fri 26 Sep 2014 12:01
by neiltrodden
Hi there,

We are using LinqConnect v4.4.441 and trying to debug some problems we have with our applications. These are all ASP.NET MVC applications connecting to an Oracle 11g database. Can you advise on the following issues?

Problem 1

We can monitor our application using dbMonitor and a LinqMonitor object in our application but we wanted to use a OracleMonitor because of the following line in your documentation seems to suggest we can monitor the entire connection pool:
LinqMonitor doesn't support connection pool monitoring. To monitor connection pools install the Professinal editions of the Devart data providers and use provider-specific monitors (OracleMonitor, MySqlMonitor, PgSqlMOnitor, SQLiteMonitor).
..but if we use OracleMonitor we get:
This property can be used only in the editions that support the dbMonitor application.
..can't we use this with LinqConnect Professional?

Problem 2

We have a problem where our web applications run fine but every few hours suddenly stop working *until* we recycle the application pool. The error occurs when we try to connect to the database and open a connection:

Code: Select all

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 26-09-2014 13:10:47 
Event time (UTC): 26-09-2014 11:10:47 
Event ID: fbfbbc8277be490dad1025f3f52e2d5e 
Event sequence: 2 
Event occurrence: 1 
Event detail code: 0 
 
Server did not respond within the specified timeout interval
   at Devart.Data.Oracle.b5.a(cn A_0, bv A_1)
   at Devart.Data.Oracle.bo..ctor(cn A_0, bo A_1)
   at Devart.Data.Oracle.bd.a(DbConnectionOptions A_0, Object A_1, DbConnectionBase A_2)
   at Devart.Common.t.a(DbConnectionPool A_0, DbConnectionOptions A_1, DbConnectionBase A_2)
   at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
   at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
   at Devart.Common.t.c(DbConnectionBase A_0)
   at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
   at Devart.Common.DbConnectionBase.Open()
   at Devart.Data.Oracle.OracleConnection.Open()
   at Devart.Data.Oracle.Linq.Provider.OracleDataProvider.Initialize(Object connection)
   at Devart.Data.Linq.DataProvider.a(IDataServices A_0, Object A_1)
   at Devart.Data.Linq.DataContext.a(Object A_0, MappingSource A_1, Type A_2)
   at Devart.Data.Linq.DataContext..ctor(String connectionString, MappingSource mapping)
We get that timeout very quickly - under half a second and we resolve the error by recycling the application pool for that web application.

Some of these applications connect to our production database server using the same connection string but one might be stuck on this error and continually failing while the other application continued to run and establish database connections.

Can you give any advice on how we might get more details on why this is happening?

Re: Problems with dbMonitor and odd timeout errors

Posted: Mon 29 Sep 2014 14:05
by MariiaI
..but if we use OracleMonitor we get:
This property can be used only in the editions that support the dbMonitor application.
..can't we use this with LinqConnect Professional?
OracleMonitor class is available in dotConnect for Oracle Professional/Standard/Developer/Mobile editions: http://www.devart.com/dotconnect/oracle/editions.html
LinqConnect Professional includes the Express editions (not the Professional) of our data providers (i.e. dotConnect for Oracle, dotConnect for PostgreSQL, dotConnect for MySQL, dotConnect for SQLite).
Server did not respond within the specified timeout interval
You are using the Direct mode, aren't you?
General recommendations for such scenarios:
1) avoid using the same OracleConnection in several threads at the same time because OracleConnection instance is not guaranteed to be thread safe
2) try using the "Validate Connection=true;" connection string parameter to validate connections that are being got from the pool;
3) try using the OCI mode (via Oracle client).

If this doesn't help, please try to localize the issue and send us a small test project with the corresponding DDL/DML script.

Re: Problems with dbMonitor and odd timeout errors

Posted: Wed 01 Oct 2014 08:56
by carli
Hi, I am working with Neil on this source and would like to ask some follow up questions please.
2) try using the "Validate Connection=true;" connection string parameter to validate connections that are being got from the pool;
This is validating connections at the time of use rather than on a 30 second interval. Can you expand on how this would help to resolve the problem?
If broken connections are the problem here, would these not be validated after 30 seconds and therefore the problem be resolved (this is not currently the case, the problem persisted until the application was recycled).
Server did not respond within the specified timeout interval
Can you confirm the scenarios under which we would see this message, as the response appears to be to quick for an actual timeout?


Also, when trying to use LinqMonitor on the server, I am not seeing any logging on a local instance of dbmonitor, can you confirm any special considerations that need to be taken when configuring? FYI I have matched the port in the application and am using localhost, would this require any privileges that an application pool account would not have?

Re: Problems with dbMonitor and odd timeout errors

Posted: Thu 02 Oct 2014 12:23
by MariiaI
This is validating connections at the time of use rather than on a 30 second interval. Can you expand on how this would help to resolve the problem?

"Validate Connection" parameter indicates whether to validate connections that are being taken from the pool. If true, each time when a connection is taken from the pool, it is checked for validity and if the connection is not valid, it is destroyed and a new one is created.
Can you confirm the scenarios under which we would see this message, as the response appears to be to quick for an actual timeout?
It can be assumed that you have run out of connections available. To solve the problem you can also try increasing Max Pool Size connection string parameter value. The default value is 100:
http://www.devart.com/dotconnect/oracle ... tring.html
Also, when trying to use LinqMonitor on the server, I am not seeing any logging on a local instance of dbmonitor, can you confirm any special considerations that need to be taken when configuring?
Please refer to http://www.devart.com/dotconnect/oracle ... nitor.html, the "To trace your application remotely with dbMonitor you should follow these steps:..." section.

Re: Problems with dbMonitor and odd timeout errors

Posted: Mon 27 Oct 2014 10:27
by carli
Hi,

Following up on this matter, I can confirm that the problem effects the DevArt client but the Oracle.DataAccess.Client class continues to work.

Around the time of the issue in one application I have noticed the following exception being logged:
Column 'InvariantName' is constrained to be unique. Value 'System.Data.OracleClient' is already present.

at System.Data.UniqueConstraint.CheckConstraint(DataRow row, DataRowAction action)
at System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs args, DataRow eRow, DataRowAction eAction, Boolean fireEvent)
at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Boolean suppressEnsurePropertyChanged, Int32 position, Boolean fireEvent, Exception& deferredException)
at System.Data.DataTable.InsertRow(DataRow row, Int64 proposedID, Int32 pos, Boolean fireEvent)
I can see in the machine config that there is only a single entry of this config section, could this be a section that you are trying to dynamically register? Just to confirm I do not have this added in the web config either.

Re: Problems with dbMonitor and odd timeout errors

Posted: Tue 28 Oct 2014 18:24
by Shalex
There are no Devart.* classes in your call stack.
1. Why have you decided that the "Value 'System.Data.OracleClient' is already present." issue is caused by LinqConnect?
2. Tell us the steps we should follow in our environment to reproduce the error. If possible, send us a small test project.