You are viewing limited content. For full access, please sign in.

Question

Question

LFDS Installation SQL Timeout

asked on June 7, 2024 • Show version history

Solution: Just use SA for the install not worth the hassle hunting down the security issue. 

 

I'm setting up a test environment and the initial configuration of the LFDS DB fails with the following error:

 

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
ALTER DATABASE statement failed.
Operation cancelled by user. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Laserfiche.LicenseManager.SqlServerSmoWrapper.CreateSchema()
   at Laserfiche.LicenseManager.LicenseManagerService.CreateLicenseDatabase(LicenseManagerServiceCallArgs _args)
   at Laserfiche.LicenseManager.LicenseManagerService.DispatchFunction(LicenseManagerServiceCall func, LicenseManagerServiceCallArgs args)
ClientConnectionId:2ecee4f4-08f3-4067-85a6-8459b40b3728
Error Number:-2,State:0,Class:11
Exception Data:
HelpLink.ProdName: Microsoft SQL Server
HelpLink.ProdVer: 16.00.1115
HelpLink.EvtSrc: MSSQLServer
HelpLink.EvtID: -2
HelpLink.BaseHelpUrl: http://go.microsoft.com/fwlink
HelpLink.LinkId: 20476


Type:
System.Data.SqlClient.SqlException

Stack Trace:
   at System.Data.SqlClient.SqlConnection.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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Laserfiche.LicenseManager.SqlServerSmoWrapper.CreateSchema()
   at Laserfiche.LicenseManager.LicenseManagerService.CreateLicenseDatabase(LicenseManagerServiceCallArgs _args)
   at Laserfiche.LicenseManager.LicenseManagerService.DispatchFunction(LicenseManagerServiceCall func, LicenseManagerServiceCallArgs args)

 

 

--------------------------------

It is creating some of the tables in the DB but times out after ~30 seconds.

I have no other error in the event log, SQL or IIS logs. 

If there a config I can modify to increase the timeout?

All SQL permissions look to be set properly. It's the same error with windows and sql authentication. 

 

Thanks in advance!

 

 

0 0

Replies

replied on March 20, 2025 • Show version history

I just ran into this issue installing LFDS 12.

 

A trace showed the offending command was: ALTER DATABASE [LFDS] SET READ_COMMITTED_SNAPSHOT ON which seems to have issues in SQL server taking a long time.

 

Creating the database, running the following SQL commands immediately after creation, then configuring Laserfiche Directory Sever after running those commands seemed to do the trick:

ALTER DATABASE [LFDS] SET SINGLE_USER

ALTER DATABASE [LFDS] SET READ_COMMITTED_SNAPSHOT ON

ALTER DATABASE [LFDS] SET MULTI_USER

1 0
replied on July 31

One other note, having run into this recently myself: the SET READ_COMMITTED_SNAPSHOT requires an exclusive lock on the database, which seemed to mean that even things like having retrieved a list of tables from the DB in SQL Server Management Studio was holding up the execution of the command.

We had to open up a fresh SSMS session and run the commands in a new query window without opening the DB -- but also just closing SSMS after having done the initial database setup might have been enough to avoid the error in the first place (though we did not test this, since the other way worked).

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.