The "Connecting..." status is often displayed and then you see "Last synchronization" during eWay-CRM synchronization

Description

If the DebugLevel = 0 (in registers), this message can be in the log:

HASH: F3F522677A9CD9FC62C1519CD54FF849
Synchronization failed
eWay.Core.Exceptions.InternetConnectionException: The operation has timed out ---> System.Net.WebException: The operation has timed out
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at eWay.Core.eWayWS.eWayWS.LogIn(String UserName, String PasswordHash, String ClientVersion, String ClientID)
at eWay.Core.WebService.Connection.LogIn()
at eWay.Core.WSDataInterface.eWayWSConnection.LogIn()
at eWay.Core.WebService.Connection.get_SID()
at eWay.Core.WSDataInterface.eWayItemStore.b__18()
at eWay.Core.WebService.BasicItemStore.CallWebServiceMethod[TResult](WebServiceMethodDelegate`1 method, Boolean supressAfterReLoginEventHandler)
at eWay.Core.WebService.BasicItemStore.CallWebServiceMethod[TResult](WebServiceMethodDelegate`1 method)
at eWay.Core.WSDataInterface.eWayItemStore.CallWebServiceMethod[TResult](WebServiceMethodDelegate`1 method)
at eWay.Core.WSDataInterface.eWayItemStore.GetItemsLastChange(DateTime& lastChange)
--- End of inner exception stack trace ---
at eWay.Core.WSDataInterface.eWayItemStore.GetItemsLastChange(DateTime& lastChange)
at eWay.Core.CachedDataInterface.CachedItemStore.GetItemsLastChange(DateTime& lastChange)
at eWay.StandardEdition.Synchronization.SynchronizeThread.TryGetItemsLastChange(DateTime& lastChange, Int64& lastChangeId)
--- END TRACE ---

The server log shows this message:

[12] ERROR w3wp [(null)] - Operation time-out
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.
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.SqlDataReader.ConsumeMetaData()
v System.Data.SqlClient.SqlDataReader.get_MetaData()
v System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
v System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
v System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
v System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
v System.Data.SqlClient.SqlCommand.ExecuteScalar()
v eWay.Core.Data.SynchronizedSqlCommand.<>c__DisplayClass1.b__0()
v eWay.Core.Data.SqlCommandRepeater.RunSqlCommand(SqlCommand command, SqlCommandDelegate sqlCommand)
v eWay.Core.Data.SynchronizedSqlCommand.ExecuteScalar()
v eWay.WebService.MSSQLDataInterface.WsSqlCommand.<>c__DisplayClass9.b__8()
v eWay.WebService.MSSQLDataInterface.WsSqlCommand.RunCommand(SqlCommandDelegate method)
2015-06-22 09:36:29,580 [12] ERROR w3wp [(null)] - Request processed with error response 'rcDatabaseTimeout'
eWay.WebService.Core.Exceptions.WebServiceInternalException: Operation time-out
v eWay.WebService.MSSQLDataInterface.WsSqlCommand.RunCommand(SqlCommandDelegate method)
v eWay.WebService.MSSQLDataInterface.WsSqlCommand.ExecuteScalar()
v eWay.WebService.ServiceLogic.Security.ClientSession.UpdateSession(Guid sid)
v eWay.WebService.ServiceLogic.Security.ClientSession..ctor(Guid sid, ItemStore itemStore)
v eWayWSImpala.eWayWS.GetItemsLastChange(Guid SID)

The transaction log of the database is not emptying and its size can be even in gigabytes.

Version

All versions of eWay-CRM

Difficulty

Medium

Resolution

Content:

Option 1: Huge transaction log

Active backup

You need to check whether the backup of eWay-CRM is active. The active backup ensures that the transaction log is emptied.

Individual backup (inactive)

If you don't want to use the active backup, you need to solve the backup of the transaction log.

You can set the Recovery model of the eWay-CRM database from FULL to SIMPLE. This can be done in the database properties of the Microsoft SQL Management Studio (see the picture below).

Option 2: Check the number of changes in the EWD_ItemChanges table

The table is used for the synchronization of changes among the client applications. It should have a hundred thousand records at maximum.

SELECT COUNT(*) FROM EWD_ItemChanges

Older versions leave records older than 3 months in the table. You can delete items in the table and leave only changes for the last month.

EXEC eWaySP_DeleteOldItemChanges 1

Option 3: Check that the database is not overloaded by jobs (eWayTimer)

Use Activity Monitor in SQL Management Studio to see the active processes. If there are a lot of active jobs in the eWayTimer application, it is possible that the database is overloaded due to planned tasks.

Try to turn off eWayTimer (see How to Stop eWay-CRM Web Service and eWayTimer) and see whether the issue remains.

If it helps, we recommend that only one job runs at a time: eWay-CRM Server Fine Tuning.