November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi, Muhammad
Can you reproduce this issue? Is there any certain steps to reproduce?
Let's enable debug logging for CMO statistics handler and see what kind of data it gets and tries to save. Add logger as described below in EPiServerLog.config.
<?xml version="1.0" encoding="utf-8"?>
<log4net>
...
<appender name="outputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%thread] %level %logger: %message%n" />
</layout>
</appender>
<logger name="EPiServer.Cmo.Core.Statistics.StatisticsHandler" additivity="false">
<level value="Debug" />
<appender-ref ref="outputDebugStringAppender" />
</logger>
...
</log4net>
You can use your favorite appender instead of DebugView and write logs to file, for example.
Try to reproduce the problem and find the lines in the log where statistics is processed. Search for text like "Process request with statistics data" and see details.
Hi Dmytro
I am not able to replicate this on dev/staging - will now enable the additional logging on live where currently compaigns / LM are disabled due to that error.
Our live is load-balanced (2 web fronts) where statistics are disabled on backend server - it looks like either a envionment related problem or may be something to do with LB.
I will let you know my findings.
Cheers,Muhammad
Hi Dmytro
finally found a time to look at this and it comes up the UserAgent field in the CMO table CMO_CMLogEntry throws data truncation error. Its set to maximum lenght of 255 whereas certain certain agent has more than 255 characters.
Any fix available for this from episerver other than us changing the database manually?
Regards,
Muhammad
I don't think there is any hotfix for this case.
I'll file a bug. Could you specify how to reproduce the issue? What is your user agent?
Hi
Has any one seen this or aware of why this could happen ?
EPiServer.Cmo.Core.Statistics.StatisticsHandler.SaveStatistics - Unable to save statistics to database.
System.Data.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
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.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
--- End of inner exception stack trace ---
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
at EPiServer.Cmo.Core.Entities.CmoEntities.SaveChangesSkipSecurity()
at EPiServer.Cmo.Core.Statistics.StatisticsHandler.SaveStatistics(RequestStatisticsData data)
Cheers, Muhammad