Error following upgrade to 2.7001


https://forum.kartris.com/Topic3389.aspx
Print Topic | Close Window

By TheCalicoTree - Mon 6 Oct 2014
We upgraded on Saturday, the site was running fine for 24 hours after which we received this error:

[SqlException (0x80131904): Arithmetic overflow error for data type tinyint, value = 745.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +392 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +815 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4515 System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) +368 System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) +502 System.Data.SqlClient.SqlDataReader.Read() +37 System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +167 System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +292 System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +663 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +371 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +487 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +296 kartrisProductsDataTableAdapters.ProductsTblAdptr.GetTopList(Nullable`1 Limit, Nullable`1 LANG_ID, Nullable`1 StartDate) in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\a7bab648\39260815\App_Code.c3tmimuz.9.vb:3001 ProductsBLL.GetTopListProductsForCache() in C:\inetpub\wwwroot\hotel-buyer-store.co.uk\App_Code\BLL\ProductsBLL.vb:150 KartSettingsManager.RefreshTopListProductsCache() in C:\inetpub\wwwroot\hotel-buyer-store.co.uk\App_Code\SettingsManager.vb:188 KartrisHttpModule.Init(HttpApplication context) in C:\inetpub\wwwroot\hotel-buyer-store.co.uk\App_Code\HttpModule.vb:46 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +530 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475[HttpException (0x80004005): Arithmetic overflow error for data type tinyint, value = 745.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12979668 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12819261

Seeing that the problem was with the GetTopList proc I found an ALTER statement from 2.5 and ran that which has stopped the error on the site.

We're a little nervous now! Any ideas?

Thanks

Helen
By simonrl - Wed 8 Oct 2014
Hi Helen

Just read your post, I've just had the exact same issue. This isn't going to help you much but I came to similar conclusions as you did but fixed it differently:

http://forum.kartris.com/Topic3391.aspx

I toggled the status of the product with P_ID 595 to False in the DB.

Timescales are similar to yours; I did the v2.7001 upgrade a while back but it was about 24 hours since my last upload of the work-in-progress site and database to the live server.

I'm nervous about this too.

I had a look in spKartrisProducts_GetTopList but can't see anything anything implying it's expecting a tinyint but being passed an int.

I've also set the number of products to return in the top sellers list to 0 to disable the list.

Simon
By Paul - Thu 9 Oct 2014
This bug came in when we optimized a lot of the code in 2.6, with a separate versions view excluding language elements which runs a lot faster and can be used in places where the language parts are not needed. There are more details and a link to the fixed SQL here:

http://forum.kartris.com/Topic3325.aspx