Unable to insert alarm in database

I am unable to use some bigger analytic events to generate alarms. Following message is printed to logs:

019-07-31 12:00:00 AM UTC+03:00 Error XPathSqlConnection Error importing XML: Error executing post SQL command. InnerException: String or binary data would be truncated.

Skipping import of root node: . EventHeader ID: 152f2a9a-fea4-46bb-aee6-45c11d0e8d08

2019-07-31 12:00:00 AM UTC+03:00 Error Alarm cache Failed to add Alarm. Exception: Unable to insert alarm in database.

Exception details:

System.Exception: Unable to insert alarm in database.

at VideoOS.Event.Server.DB.AlarmDbHandlers.AlarmHandler.Write(Alarm alarm, BaseEvent baseEvent, XPathSqlConnection xPathSqlConnection)

at VideoOS.Event.Server.Alarm.AlarmActionItems.AddAlarmActionItem.Execute()

at VideoOS.Event.Server.Alarm.AlarmCache.Write(IEnumerable`1 items)

at VideoOS.Event.Server.Alarm.Cache`1.AddWorkerThread()

Can anything be done to increase size limit?

Are you submitting an analytics event that is received but does not result in an alarm by alarm definition or are you submitting an analytics event directly?

Can you show me the code and the XML/class variables you use?

In your current setup: Are you using the Microsoft SQL Server Express Edition that came with Milestone XProtect or Microsoft SQL Server? How big is the database?

Analytic events are received successfully, but alarms are not created based alarm definitions.

SQL Server installed by Milestone installer. I am not sure, how to check database size.

I have attached an example analytic event.

The field is in the SQL database stored in a nvarchar(110), I guess changing this could cause errors, instead I would like to recommend that you use the field, this is nvarchar(MAX).