TimeOut Error 1.1.30

Topics: Troubleshooting
Apr 26, 2011 at 8:51 AM

I was just openning some pages and ... this error appear on all the pages, and each time i try to open a page the error come back . To remove this error i'm forced to recycle my application pool

Server Error in '/help' Application.


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.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[InvalidOperationException: 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.]
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +5024537
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
System.Data.SqlClient.SqlConnection.Open() +125
NHibernate.Connection.DriverConnectionProvider.GetConnection() +104
NHibernate.AdoNet.ConnectionManager.GetConnection() +42
NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd) +46

[ADOException: While preparing SELECT contentite0_.Id as Id54_0_, contentite0_.Data as Data54_0_, contentite0_.ContentType_id as ContentT3_54_0_ FROM Orchard_Framework_ContentItemRecord contentite0_ WHERE contentite0_.Id=@p0 an error occurred]
NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd) +230
NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) +68
NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) +264
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +186
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +70
NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister) +265
NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject, Object optionalId) +33
NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id, Object optionalObject, ISessionImplementor session) +18
NHibernate.Persister.Entity.AbstractEntityPersister.Load(Object id, Object optionalObject, LockMode lockMode, ISessionImplementor session) +103
NHibernate.Event.Default.DefaultLoadEventListener.LoadFromDatasource(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +131
NHibernate.Event.Default.DefaultLoadEventListener.DoLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +472
NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +98
NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +253
NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) +367
NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) +183
NHibernate.Impl.SessionImpl.Get(String entityName, Object id) +192
NHibernate.Impl.SessionImpl.Get(Type entityClass, Object id) +161
NHibernate.Impl.SessionImpl.Get(Object id) +199
Orchard.Data.Repository`1.Get(Int32 id) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Data\Repository.cs:87
Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Int32 id) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Data\Repository.cs:56
Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\ContentManagement\DefaultContentManager.cs:120
Orchard.ContentManagement.DefaultContentManager.Get(Int32 id) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\ContentManagement\DefaultContentManager.cs:101
Orchard.ContentManagement.ContentGetExtensions.Get(IContentManager manager, Int32 id) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\ContentManagement\ContentExtensions.cs:146
Orchard.Core.Settings.Services.SiteService.GetSiteSettings() in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard.Web\Core\Settings\Services\SiteService.cs:45
Orchard.Settings.CurrentSiteWorkContext.Get(String name) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Settings\CurrentSiteWorkContext.cs:13
Orchard.Environment.<>c__DisplayClass5`1.<FindResolverForState>b__0(IWorkContextStateProvider wcsp) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Environment\WorkContextImplementation.cs:32
System.Linq.WhereSelectArrayIterator`2.MoveNext() +85
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +166
Orchard.Environment.WorkContextImplementation.FindResolverForState(String name) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Environment\WorkContextImplementation.cs:32
System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +72
Orchard.Environment.WorkContextImplementation.GetState(String name) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Environment\WorkContextImplementation.cs:27
Orchard.WorkContext.get_CurrentSite() in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\WorkContext.cs:25
Orchard.Localization.Services.SiteCultureSelector.GetCulture(HttpContextBase context) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Localization\Services\SiteCultureSelector.cs:13
Orchard.Localization.Services.<>c__DisplayClass8.<GetCurrentCulture>b__3(ICultureSelector x) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Localization\Services\DefaultCultureManager.cs:54
System.Linq.WhereSelectArrayIterator`2.MoveNext() +85
System.Linq.WhereEnumerableIterator`1.MoveNext() +87
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +217
System.Linq.<GetEnumerator>d__0.MoveNext() +96
System.Linq.Enumerable.Count(IEnumerable`1 source) +201
Orchard.Localization.Services.DefaultCultureManager.GetCurrentCulture(HttpContextBase requestContext) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Localization\Services\DefaultCultureManager.cs:58
Orchard.Localization.Services.CurrentCultureWorkContext.<Get>b__0(WorkContext ctx) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Localization\Services\CurrentCultureWorkContext.cs:13
Orchard.Environment.<>c__DisplayClass5`1.<FindResolverForState>b__3() in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Environment\WorkContextImplementation.cs:37
Orchard.Environment.WorkContextImplementation.GetState(String name) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Environment\WorkContextImplementation.cs:28
Orchard.WorkContext.get_CurrentCulture() in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\WorkContext.cs:40
Orchard.Localization.Text.Get(String textHint, Object[] args) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Localization\Text.cs:28
Orchard.UI.Admin.AdminFilter.OnAuthorization(AuthorizationContext filterContext) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\UI\Admin\AdminFilter.cs:23
System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor) +102
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
System.Web.Mvc.Controller.ExecuteCore() +116
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in C:\Projects\Availpro\Siriona.Availpro.HelpWebSite\src\Orchard\Mvc\Routes\ShellRoute.cs:148
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841105
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Coordinator
Apr 26, 2011 at 7:15 PM

I'd look for a rogue module that is creating connections and not closing them or at least getting a reference to a resource that itself holds on to a connection and that is never freed. Usually caching code or singletons are a good place to look.

Apr 27, 2011 at 7:54 AM

their my current active modules (other than default modules)

Vandelay.Favicon

Szmyd.Orchard.Modules.Menu

SH.GoogleAnalytics

Orchard.CulturePicker

Orchard.ArchiveLater

Iroo.VersionManager

Lucene

 

I'm currently looking for some place where dispose are missing, but without result actually...

Coordinator
Apr 27, 2011 at 5:42 PM

On thing you can do for now is disable those modules one by one and see if it makes a difference.

Coordinator
Apr 27, 2011 at 9:43 PM

I was able to reproduce that on my own site. Random hypothesis: do you have search enabled on that site?

Coordinator
Apr 28, 2011 at 6:21 PM

FYI, I filed this to keep track, and we might have a fix that we need to verify with anyone experiencing the problem. http://orchard.codeplex.com/workitem/17781

Apr 28, 2011 at 7:47 PM

Yes i have the search module activated.

 

Moreover, i have an exception in indexing module in local. (many times) i will put the exception code here tomorrow

Coordinator
Apr 28, 2011 at 7:53 PM

We might have a patch then. You can disable search, indexing and Lucene in the meantime. We'll keep you posted.

Coordinator
Apr 28, 2011 at 7:58 PM

Please take a look at the bug in the issues tracker, we have provided a fix.

Apr 29, 2011 at 1:22 PM

I think the fix work fine (no error today)

 

thanks!

Jun 23, 2011 at 2:24 PM

i'm currently in currently on orchard 1.2 , default branch (rev 5390) and i've been stroke by the same error.

Could it be a regression ? thanks !

Coordinator
Jun 23, 2011 at 8:27 PM

Could you give us the stack trace please, from the logs ?

Jun 24, 2011 at 8:04 AM

here one of the exception :

  2011-06-23 15:11:08,341 [230] Orchard.Events.DefaultOrchardEventBus - TargetInvocationException thrown from IBackgroundTask.Sweep by Orchard.Packaging.Services.BackgroundPackageUpdateTask
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.ADOException: While preparing SELECT this_.Id as Id1167_0_, this_.FeedTitle as FeedTitle1167_0_, this_.FeedUrl as FeedUrl1167_0_ FROM Orchard_Packaging_PackagingSource this_ an error occurred ---> System.InvalidOperationException: 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.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at NHibernate.Connection.DriverConnectionProvider.GetConnection()
   at NHibernate.AdoNet.ConnectionManager.GetConnection()
   at NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd)
   --- End of inner exception stack trace ---
   at NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd)
   at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)
   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session)
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session)
   at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results)
   at NHibernate.Impl.CriteriaImpl.List(IList results)
   at NHibernate.Impl.CriteriaImpl.List()
   at NHibernate.Linq.CriteriaResultReader`1.d__0.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Packaging.Services.PackagingSourceManager.GetSources()
   at Orchard.Packaging.Services.BackgroundPackageUpdateTask.Sweep()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\Projects\src\Orchard\Events\DefaultOrchardEventBus.cs:line 85
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\Projects\src\Orchard\Events\DefaultOrchardEventBus.cs:line 71
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in C:\Projects\src\Orchard\Events\DefaultOrchardEventBus.cs:line 51

Coordinator
Jun 27, 2011 at 7:07 PM

Can we switch to e-mail? My e-mail is bleroy at microsoft, and Sébastien is sebros at microsoft. Would it be possible to have a local copy of the site to debug on?

Jul 27, 2011 at 1:03 PM

I was tinking the problem disapeared

but it is back

we are currently in 1.2

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.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: 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.

Source Error:

Line 38:             var workContext = _workContextAccessor.GetContext(filterContext);
Line 39: 
Line 40:             if (workContext == null ||
Line 41:                 workContext.Layout == null ||
Line 42:                 workContext.CurrentSite == null ||


Source File: d:\Servers\WebSite\Modules\Orchard.Widgets\Filters\WidgetFilter.cs    Line: 40

Stack Trace:

[InvalidOperationException: 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.]
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +6296257
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6296606
   System.Data.SqlClient.SqlConnection.Open() +300
   NHibernate.Connection.DriverConnectionProvider.GetConnection() +221
   NHibernate.AdoNet.ConnectionManager.GetConnection() +95
   NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd) +43

[ADOException: While preparing SELECT contentite0_.Id as Id58_0_, contentite0_.Data as Data58_0_, contentite0_.ContentType_id as ContentT3_58_0_ FROM Orchard_Framework_ContentItemRecord contentite0_ WHERE contentite0_.Id=@p0 an error occurred]
   NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd) +390
   NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) +77
   NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) +556
   NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +274
   NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +114
   NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister) +654
   NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject, Object optionalId) +76
   NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id, Object optionalObject, ISessionImplementor session) +32
   NHibernate.Event.Default.DefaultLoadEventListener.LoadFromDatasource(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +185
   NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +181
   NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) +1031
   NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) +403
   NHibernate.Impl.SessionImpl.Get(String entityName, Object id) +449
   NHibernate.Impl.SessionImpl.Get(Type entityClass, Object id) +374
   NHibernate.Impl.SessionImpl.Get(Object id) +391
   Orchard.Data.Repository`1.Get(Int32 id) in C:\Projects\WebSite\src\Orchard\Data\Repository.cs:87
   Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Int32 id) in C:\Projects\WebSite\src\Orchard\Data\Repository.cs:56
   Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options) in C:\Projects\WebSite\src\Orchard\ContentManagement\DefaultContentManager.cs:120
   Orchard.ContentManagement.DefaultContentManager.Get(Int32 id) in C:\Projects\WebSite\src\Orchard\ContentManagement\DefaultContentManager.cs:101
   Orchard.ContentManagement.ContentGetExtensions.Get(IContentManager manager, Int32 id) in C:\Projects\pWebSite\src\Orchard\ContentManagement\ContentExtensions.cs:146
   Orchard.Core.Settings.Services.SiteService.GetSiteSettings() in C:\Projects\WebSite\src\Orchard.Web\Core\Settings\Services\SiteService.cs:38
   Orchard.Settings.CurrentSiteWorkContext.Get(String name) in C:\Projects\WebSite\src\Orchard\Settings\CurrentSiteWorkContext.cs:13
   Orchard.Environment.<>c__DisplayClass5`1.<FindResolverForState>b__0(IWorkContextStateProvider wcsp) in C:\Projects\WebSite\src\Orchard\Environment\WorkContextImplementation.cs:32
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +110
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +200
   Orchard.Environment.WorkContextImplementation.FindResolverForState(String name) in C:\Projects\WebSite\src\Orchard\Environment\WorkContextImplementation.cs:32
   System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +83
   Orchard.Environment.WorkContextImplementation.GetState(String name) in C:\Projects\WebSite\src\Orchard\Environment\WorkContextImplementation.cs:27
   Orchard.WorkContext.get_CurrentSite() in C:\Projects\WebSite\src\Orchard\WorkContext.cs:25
   Orchard.Widgets.Filters.WidgetFilter.OnResultExecuting(ResultExecutingContext filterContext) in d:\Servers\WebSite\Modules\Orchard.Widgets\Filters\WidgetFilter.cs:40
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +70
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +784900
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +784900
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +265
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +784976
   System.Web.Mvc.Controller.ExecuteCore() +159
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +54
   Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in C:\Projects\WebSite\src\Orchard\Mvc\Routes\ShellRoute.cs:148
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +453
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +371

Coordinator
Jul 27, 2011 at 8:23 PM

I'm forwarding this around. Will follow-up.

Coordinator
Jul 27, 2011 at 9:12 PM

Could you provide us with the error logs from the App_Data\logs ? This might explain where the connections leak is coming from.

Thanks

Jul 28, 2011 at 8:41 AM
Edited Jul 28, 2011 at 8:42 AM

here you can see the log of the day :

the error have been reported at 2PM

http://dl.free.fr/gwYWIARR4

Oct 6, 2011 at 6:59 PM
Edited Oct 6, 2011 at 7:01 PM

i can provide a module without any dependendy and just a few lines of code

reproducing same stack trace just ending with with orchars 1.2 and 1.3

 

where to send it to?

 

The connection object can not be enlisted in transaction scope.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The connection object can not be enlisted in transaction scope.

Source Error:

Line 146:            public void EndProcessRequest(IAsyncResult result) {
Line 147:                try {
Line 148:                    _httpAsyncHandler.EndProcessRequest(result);
Line 149:                }
Line 150:                finally {


Source File: E:\Orchard\src\Orchard\Mvc\Routes\ShellRoute.cs    Line: 148

Stack Trace:

[InvalidOperationException: The connection object can not be enlisted in transaction scope.]
   System.Data.SqlServerCe.SqlCeConnection.Enlist(Transaction tx) +283
   System.Data.SqlServerCe.SqlCeConnection.Open() +423
   NHibernate.Connection.DriverConnectionProvider.GetConnection() +155
   NHibernate.AdoNet.ConnectionManager.GetConnection() +90
   NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd) +71

[ADOException: While preparing SELECT this_.Id as Id46_0_, this_.Name as Name46_0_, this_.Description as Descript3_46_0_ FROM Testing_TestRecord this_ an error occurred]
   NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd) +305
   NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) +100
   NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) +365
   NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +420
   NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollec

Coordinator
Oct 6, 2011 at 7:09 PM

e-mail addresses are a few posts above. Thanks.

Coordinator
Oct 7, 2011 at 7:12 PM

In your example, you are declaring the service as an ISingletonDependency, though Transactions and thus Repositories are handled by request. This makes the same transaction manager reused across requests, which leads to the issue you are describing.

There are two solutions, either you declare your interface as IDependency, or if you really need a Singleton, which I strongly doubt, you can inject a Work<IRepository<TestRecord>>, which will be resolved at the request level.

Oct 11, 2011 at 8:23 PM
Edited Oct 11, 2011 at 8:23 PM

that is 100% what I was searching for!! thank you so much.

in this example i understand that you doubt the need. i just created it for demonstration. in other cases its needed :))

 

thank you, asap its ready i'll donate the module