We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

FM Data Server Timeout Errors on Building Indexes

Answered
Franklin Ashcraft asked on November 2, 2022

We are receiving the below error while building the indexes from our SQL Server.
System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at Flexmonster.DataServer.Core.Parsers.DatabaseParser.Parse()+MoveNext()
   at Flexmonster.DataServer.Core.DataLoaders.DataLoader.Load(String index)
ClientConnectionId:25e96014-1bac-4336-968e-8264530a14a5
Error Number:-2,State:0,Class:11
ClientConnectionId before routing:9e25318e-ace0-4fa0-ac89-970fc96f7346
Routing Destination:a036af6e95a5.tr31492.eastus1-a.worker.database.windows.net,11059
 
Our Connection String:
Server=tcp:xxx.xxx.xxx.xxx,xxxx;Initial Catalog=XX;Persist Security Info=False;User ID=XXXX;Password=XXXX;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=300;
 
We also have the parameters set as below:
CommandTimeout=180
DataRefreshTime=1440
KeepDataOnRefresh=true
RetryAttempts=3
 
We are running Version 2.9.26.1 of FlexMonster
Our SQL server is 2019 Standard

3 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 3, 2022

Hello, Franklin,

Thank you for reaching out to us.

Firstly, we suggest checking the SQL Server Profiler and analyzing which requests take the most time. It can help to find how the query can be optimized. 
Alternatively, you can enable the "Command timeout" configuration in the Data Server. More information you can find in our documentation: https://www.flexmonster.com/doc/admin-panel-guide/ 

Please let us know if it works for you. Feel free to contact us if other questions arise.

Kind regards,
Nadia

Public
Franklin Ashcraft November 3, 2022

Thank you.  We were able to set the command timeout to get some to complete, and have other queries to improve.  We wound up having to update our data server version for the command timeout to work.  This is working now.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 3, 2022

Hello,

Thank you for the quick response.

We are glad to hear that it works for you.

As always, you are welcome to contact us if further questions arise.

Kind regards,
Nadia

Please login or Register to Submit Answer