Overload on hosting after updating 1.8.1

Topics: Core, General
Jul 18, 2014 at 5:59 PM
Hello.
I want to describe my situation.
I have a site with 10000 hosts/day (5 requests in sec). I have been working on 1.7.1 (1.7.2.) version for a long time. This week I have updated to 1.8.1 version.
I uploaded files to hosting (arvixe) and after about an hour my domain was blocked because of violation of TOS (terms of services).
The admin told me that I repeatedly exceeded CPU resources…

Earlier I read that new version works faster than 1.7.2.
I had to change hosting and I am afraid to update to a new version.

Unfortunately, I could not get log because I was in a hurry to restore an old version.
Can this overload be connected with an updating to 1.8.1?

When I work on localhost and open several pages simultaneously, I have an error…..

2014-07-18 20:30:15,504 [28] NHibernate.Util.ADOExceptionReporter - (null) - Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
(null)
2014-07-18 20:30:15,520 [28] NHibernate.Util.ADOExceptionReporter - (null) - Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
(null)
2014-07-18 20:30:15,524 [28] Orchard.Exceptions.DefaultExceptionPolicy - Default - An unexpected exception was caught
http://localhost:7684/articles/гаиморит-как-лечить NHibernate.Exceptions.GenericADOException: could not execute query
[ SELECT this_.Id as Id44_2_, this_.Number as Number44_2_, this_.Published as Published44_2_, this_.Latest as Latest44_2_, this_.Data as Data44_2_, this_.ContentItemRecord_id as ContentI6_44_2_, contentite1_.Id as Id43_0_, contentite1_.Data as Data43_0_, contentite1_.ContentType_id as ContentT3_43_0_, contenttyp2_.Id as Id45_1_, contenttyp2_.Name as Name45_1_ FROM Orchard_Framework_ContentItemVersionRecord this_ inner join Orchard_Framework_ContentItemRecord contentite1_ on this_.ContentItemRecord_id=contentite1_.Id inner join Orchard_Framework_ContentTypeRecord contenttyp2_ on contentite1_.ContentType_id=contenttyp2_.Id WHERE contenttyp2_.Name = @p0 and this_.Published = @p1 ]
Name:cp0 - Value:Layer Name:cp1 - Value:True
[SQL: SELECT this_.Id as Id44_2_, this_.Number as Number44_2_, this_.Published as Published44_2_, this_.Latest as Latest44_2_, this_.Data as Data44_2_, this_.ContentItemRecord_id as ContentI6_44_2_, contentite1_.Id as Id43_0_, contentite1_.Data as Data43_0_, contentite1_.ContentType_id as ContentT3_43_0_, contenttyp2_.Id as Id45_1_, contenttyp2_.Name as Name45_1_ FROM Orchard_Framework_ContentItemVersionRecord this_ inner join Orchard_Framework_ContentItemRecord contentite1_ on this_.ContentItemRecord_id=contentite1_.Id inner join Orchard_Framework_ContentTypeRecord contenttyp2_ on contentite1_.ContentType_id=contenttyp2_.Id WHERE contenttyp2_.Name = @p0 and this_.Published = @p1] ---> System.Data.SqlClient.SqlException: Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
в System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
в System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
в System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
в System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
в System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
в System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
в System.Data.SqlClient.SqlDataReader.Read()
в NHibernate.Driver.NHybridDataReader.Read() в c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Driver\NHybridDataReader.cs:строка 116
в NHibernate.AdoNet.ResultSetWrapper.Read() в c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\AdoNet\ResultSetWrapper.cs:строка 47
в NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) в c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:строка 473
в NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) в c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:строка 251
в NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) в c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:строка 1564
Developer
Jul 19, 2014 at 12:08 PM
The error can be related but it's impossible to tell without further investigation what could cause the deadlock. But you may have bumped into this: https://orchard.codeplex.com/workitem/20544
Jul 19, 2014 at 3:56 PM
SQL query shown above selects 'layers'. How can I fix this situation or should I open a bug?
Developer
Jul 19, 2014 at 5:14 PM
I it's just by pure chance that this query fails since the tables in question are also on the ContentItemRecord and ContentTypeRecord table, which tables are used in practically all content item queries; so any lock on them causes all other queries to wait. So I still think that this is the same issue I linked.

I'd suggest you to try to pinpoint what leads to the deadlock so we can have a better understanding of the problem.