NHibernate error on publishing pages

Topics: Troubleshooting
Jul 18, 2014 at 7:33 PM
Edited Jul 18, 2014 at 7:35 PM
The following error is being thrown when publishing any page of any content definition. The site has been running fine for over a month, and nothing major has changed on the site. The error seems to randomly start happening, and restarting the app pool fixes the issue. I am new to Orchard, so just trying to get pointed in the right direction on why Orchard would start throwing this exception

We are using v1.7.2.0

Any help would be greatly appreciated.
2014-07-18 13:17:03,913 [9] NHibernate.Util.ADOExceptionReporter - Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
2014-07-18 13:17:03,913 [9] NHibernate.Util.ADOExceptionReporter - The wait operation timed out
2014-07-18 13:17:03,913 [9] NHibernate.Util.ADOExceptionReporter - Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
2014-07-18 13:17:03,913 [9] NHibernate.Util.ADOExceptionReporter - The wait operation timed out
2014-07-18 13:17:03,913 [9] Orchard.Exceptions.DefaultExceptionPolicy - An unexpected exception was caught
NHibernate.Exceptions.GenericADOException: could not initialize a collection: [Orchard.ContentManagement.Records.ContentItemRecord.Versions#2437][SQL: SELECT versions0_.ContentItemRecord_id as ContentI6_1_, versions0_.Id as Id1_, versions0_.Id as Id38_0_, versions0_.Number as Number38_0_, versions0_.Published as Published38_0_, versions0_.Latest as Latest38_0_, versions0_.Data as Data38_0_, versions0_.ContentItemRecord_id as ContentI6_38_0_ FROM Orchard_Framework_ContentItemVersionRecord versions0_ WHERE versions0_.ContentItemRecord_id=?] ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
   --- End of inner exception stack trace ---
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\AdoNet\AbstractBatcher.cs:line 247
   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1226
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 421
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 251
   at NHibernate.Loader.Loader.LoadCollection(ISessionImplementor session, Object id, IType type) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1372
   --- End of inner exception stack trace ---
   at NHibernate.Loader.Loader.LoadCollection(ISessionImplementor session, Object id, IType type) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1384
   at NHibernate.Event.Default.DefaultInitializeCollectionEventListener.OnInitializeCollection(InitializeCollectionEvent event) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Event\Default\DefaultInitializeCollectionEventListener.cs:line 52
   at NHibernate.Impl.SessionImpl.InitializeCollection(IPersistentCollection collection, Boolean writing) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Impl\SessionImpl.cs:line 1625
   at NHibernate.Collection.Generic.PersistentGenericBag`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Collection\Generic\PersistentGenericBag.cs:line 143
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Orchard.ContentManagement.DefaultContentManager.BuildNewVersion(ContentItem existingContentItem) in d:\Clients\src\Orchard\ContentManagement\DefaultContentManager.cs:line 450
   at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options, QueryHints hints) in d:\Clients\src\Orchard\ContentManagement\DefaultContentManager.cs:line 213
   at Orchard.Core.Contents.Controllers.AdminController.EditPOST(Int32 id, String returnUrl, Action`1 conditionallyPublish) in d:\Clients\src\Orchard.Web\Core\Contents\Controllers\AdminController.cs:line 292
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.