Kyle Miller 1 Posted March 29, 2021 (edited) Remote debugging is working fine except for when the app tries to connect to the database server. When trying to open the TFDConnection, the following error occurs: First chance exception at $75F125F2. Exception class EMSSQLNativeException with message '[FireDAC][Phys][ODBC][Microsoft][SQL Server Native Client 11.0]Unable to complete login process due to delay in opening server connection'. The app connects without an issue when run on the remote machine from the scratch directory. Are there special preparations I need to take to enable remote debugging with FireDAC & SQL Server? Edited March 29, 2021 by Kyle Miller Share this post Link to post
Guest Posted March 29, 2021 try this: https://stackoverflow.com/questions/8984801/sqlcmd-unable-to-complete-login-process-due-to-delay-in-opening-server-connectio https://stackoverflow.com/questions/27288920/unable-to-complete-login-process-due-to-delay-in-opening-server-connection-in-az https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d011656a-4ba0-42f7-a121-53482e4171ed/intermittent-quotunable-to-complete-login-process-due-to-delay-in-opening-server-connectionquot?forum=transactsql hug Share this post Link to post
Kyle Miller 1 Posted March 29, 2021 22 minutes ago, emailx45 said: try this: https://stackoverflow.com/questions/8984801/sqlcmd-unable-to-complete-login-process-due-to-delay-in-opening-server-connectio https://stackoverflow.com/questions/27288920/unable-to-complete-login-process-due-to-delay-in-opening-server-connection-in-az https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d011656a-4ba0-42f7-a121-53482e4171ed/intermittent-quotunable-to-complete-login-process-due-to-delay-in-opening-server-connectionquot?forum=transactsql hug The 2nd link seemed helpful. There's no retry for FireDAC I know, but I did increase the LoginTImeout to 300 seconds. I didn't think it would be a problem since I'm connected via broadband, but I guess connecting was just outside the default 30 second timeout. Thanks. Share this post Link to post
Guest Posted March 29, 2021 hi @Kyle Miller have you read this? http://docwiki.embarcadero.com/RADStudio/Sydney/en/Recovering_Connection_(FireDAC) another thing, you can use a "while looping" and create a "reTry" alternative for "n" time include waiting "n" seconds or another time. you see? hug Share this post Link to post
Kyle Miller 1 Posted March 30, 2021 15 hours ago, emailx45 said: hi @Kyle Miller have you read this? http://docwiki.embarcadero.com/RADStudio/Sydney/en/Recovering_Connection_(FireDAC) another thing, you can use a "while looping" and create a "reTry" alternative for "n" time include waiting "n" seconds or another time. you see? hug Good info. Nice to know the facility exists. It would not have helped here. If the connection timeout is 30 seconds & failing, retrying at the same value would results in continuous failures. The fix is to allow more connection time in a remote debug environment. I've never needed retries before as connections are always stable where I've worked. Outside remote debugging, the client machine connects to the server in less than a second in this case. Share this post Link to post
Guest Posted March 30, 2021 11 minutes ago, Kyle Miller said: Outside remote debugging, the client machine connects to the server in less than a second in this case. one thing, many peoples dont know about that: in DEBUG mode or using a connection by IDE, is like a new user connecting to the database, or be, is ONE connection as any other. Then, in some cases, like using a Interbase TRIAL for example, a project will can have 2 connections or more when connecting and debugging an application you see? Now, about timeout, this can have many others variants, like you saw in links above. Because, exist many "messages between parts" (Debug, Application, Server etc...) in some Database this can be a problem, other not. Unfortunatelly, I dont use MS SQL Server and I dont know very well. But for a simple test, you can use same logic with Interbase, Firebird for example, and see that there is not this problem... then, can be really a specific case on MSSQL Server or another you see? Anyway, the FireDAC can help with this too. As showed in Embarcadero link above. hug Share this post Link to post