Database synchronization doesn't run - insufficient system resources

Description

The log shows this error:

HASH: 46F5367A5FB177BA65C155EDC9CF7182
Synchronization failed
eWay.Core.DataInterface.StoreException: Cannot execute sql DECLARE @sql AS VARCHAR(MAX);
SET @sql = ''
SELECT @sql = @sql + 'ALTER INDEX ' + MyIndex.Name + ' ON ' + Tables.Name + ' DISABLE;' + CHAR(13) + CHAR(10)
FROM sys.indexes MyIndex
INNER JOIN sys.index_columns IndexColumns
ON MyIndex.index_id = IndexColumns.index_id
AND MyIndex.object_id = IndexColumns.object_id
INNER JOIN sys.tables Tables
ON Tables.object_id = IndexColumns.object_id
WHERE MyIndex.[type] <> 1 AND MyIndex.Name LIKE 'IX_%' 
EXEC(@sql). ---> System.Data.SqlClient.SqlException: There is insufficient system memory in resource pool 'internal' to run this query.
v System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
v System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
v System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
v System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
v System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
v System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
v eWay.Core.Data.SynchronizedSqlCommand.<>c__DisplayClass6.<ExecuteNonQuery>b__4() 
v eWay.Core.Data.SqlCommandRepeater.RunSqlCommand(SqlCommand command, SqlCommandDelegate sqlCommand)
v eWay.Core.Data.SynchronizedSqlCommand.ExecuteNonQuery()
v eWay.Core.MSSQLDataInterface.MSSQLItemStore.ExecuteRawSql(SqlConnection connection, String sql, Int32 timeOut) 
v eWay.Core.MSSQLDataInterface.MSSQLItemStore.ExecuteRawSql(SqlConnection connection, String sql, Int32 timeOut)
v eWay.Core.MSSQLDataInterface.MSSQLItemStore.EnableIndexes(Boolean enable)
v eWay.Core.CachedDataInterface.CachedItemStore.EnableIndexes(Boolean enable)
v eWay.StandardEdition.Synchronization.SynchronizeThread.Synchronize()

The most important message is: There is insufficient system memory in resource pool 'internal' to run this query.

Version

All versions of eWay-CRM

Difficulty

Low

Resolution

The issue is caused by insufficient system resources for SQL Server. You need to set higher value. Go to eWay-CRM Settings and the Advanced tab. There you can set higher usage of system resources.