RDP connection hang

avatar

Hello,

I don't see a pattern in this problem yet, but most of the time when I open an RDP connection via RDM, RDM hangs for about 20 seconds, then opens the connection.
We are using the sessions embedded.
Other embedded sessions like putty oder winscp work fine.

Is there any way to troubleshoot this problem?


Thanks in advance!


Best regards,
Benjamin Kechler

All Comments (15)

avatar

Do you see this if you open it in external mode? Do you use anything like port scan/ping or a VPN?

David Hervieux

avatar

The connection to the server is via VPN, but we don't use RDM to make the VPN connection. Other than that there is nothing special.

One thing i noticed this morning: I opened a connection, it took about 20 seconds. I closed it, immediately opened it again and it took about 5-10 seconds. After that it opened with no delay.
And of course this is the only time this problem occurred this morning.

avatar

I was able to confirm that the problem also exists if I open the connection external mode.
If I use mstsc.exe directly the connection works with no problem.

The problem also exists on at leat one other workstation.

avatar

In external mode we invoke also mstsc. Could you try to export the .RDP file and open it with mstsc directly?

David Hervieux

avatar

I exported as .rdp, works fine.

I don't think opening the connection is the problem, it seems like something before that. When I click on the entry, RDM itself hangs, I can't do anything while the connection is being opened.

I don't know what happens before the actual connection, maybe there are logfiles or possibilities to get that information?

avatar

Could you go in Windows->Profiler and check you get anything when you open a session

David Hervieux

avatar

I believe I don't quite follow :) Where is this Profiler? There is nothing in the Window Tab.

avatar

Hi,

The Profiler is located in the Help tab.

Best regards,

Jeff Dagenais

avatar

Sorry my mistake it's the Help ribbon like JF answered:

http://help.remotedesktopmanager.com/troubleshooting_profiler.htm

David Hervieux

avatar

Thank you :)

Profiler hangs together with the rest of RDM, after that it shows the following error:

Silent: 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 (0x80004005): Der Wartevorgang wurde abgebrochen
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.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, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.GetData(String sql, IDbDataParameter[] parameters)
at Devolutions.RemoteDesktopManager.Business.DataSources.SQLServerLogSubDataSource.GetOpenedConnectionInfo(Guid connectionID)
ClientConnectionId:8003671f-7633-45a9-996b-08da5c937fc1
Error Number:-2,State:0,Class:11

avatar

Seems that there is a timeout in your SQL when the application check if a connection is already opened. Could you try disable the "Warn if already opened" for a test?

Perhaps your database is missing an Index for performance.

David Hervieux

avatar

Could you please send us your DB schema for analysis.

File -> Data Sources -> Upgrade (tab) -> Email Schema to Support

Please add: "Attn: Stefane" to the message.

We will analyze and get back to you.

Best regards,

Stéfane Lavergne

avatar

Thank you very much!
Email is on the way.

Should I still test to disable the "Warn if already opened" feature?

avatar

Yes just to test my theory.

David Hervieux

avatar

Looking at you schema I realized you are running the v10.6.7.0 of RDM that corresponds to the v93 of the SQL server schema.

You have 4 options (in order of preference):

Option 1 : Upgrade to the latest beta v10.9.13.0 it has the fix

Option 2 : Enable "beta upgrade scripts", File -> Data Sources -> Edit -> Advanced (tab) -> check "Allow beta database upgrade" -> Upgrade (tab) -> Update Database -> OK -> OK -> OK

Option 2 : run a SQL script that will temporarily alleviate the issue until you upgrade to the next version (real fix). Let me know if you want to go this route, I will write the script for you

Option 3 : always run with "Warn if already opened" unchecked.

Best regards,

Stéfane Lavergne