Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Apparent SQL connection not closed error in DMX scheduled task
Last Post 09/11/2017 9:34 AM by Peter Donker. 3 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Laurence Neville
New Member
New Member
Posts:56


--
08/31/2017 12:53 PM
We are currently running Document Exchange 6.0.4. Recently we upgraded the DNN installation from 5,6.8 to 9.1.1.

Immediately after installation, about once per day, the site would become unresponsive and I would see the classic symptoms of the DB connection pool having reached its limit (100 connections): a very large number of SQL SPIDs active (e.g. if you run sp_who2 on the DB), and these errors in the Windows App log:

Exception information:
Exception type: InvalidOperationException
Exception message: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at PetaPoco.Database.OpenSharedConnection()
at DotNetNuke.Data.PetaPoco.PetaPocoExt.ExecuteReader(Database database, String sql, Object[] args) in C:\TeamCity\buildAgent\work\DNN_Platform_910_Public\Packaging\DNN.Platform\DNN Platform\Library\Data\PetaPoco\PetaPocoExt.cs:line 52
etc

By a process of elimination (disabling all scheduled tasks then re-enabling a few at a time) I determined it was almost certainly due to one of the following scheduled tasks:

DMX Maintenance Task
DMX Service Task

I know we are running a very old DMX version on a DNN version it was not designed for. Everything seems to be working however, except for this issue. We will upgrade DMX if we know that the above issue is known and fixed in a later version.

Many thanks
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
09/04/2017 8:58 PM
Hi Laurence,

The DMX Service Task has been deprecated for a while. The code has changed over the years. I just ran over the code and all use the DNN data provider so should insulate DMX against connection pooling issues. But I'll be happy to dig deeper to see if the latest version would also have these issues.

Best,
Peter
Laurence Neville
New Member
New Member
Posts:56


--
09/04/2017 9:21 PM
Thanks, please could you check. Its one or both of the following tasks:
DMX Maintenance Task
DMX Service Task
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
09/11/2017 9:34 AM
In five years a lot has changed. The service task has been deprecated since version 6.0 and the maintenance task has been rewritten. There is not much I can do to help unless you are willing to invest heavily into "getting DMX 6.0 to work on DNN 9.1". I can only support active DMX licenses that are upgraded to a more recent version (6.2 as of this writing).

Peter
You are not authorized to post a reply.