martinkabe / RSQLS

Package for interactive work with SQL Server
6 stars 1 forks source link

Timeout Expiration #15

Open jfontestad opened 6 years ago

jfontestad commented 6 years ago

Anyway to customize the login timeout?

I've been getting this error quite frequently: "SqlException message: Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=17365; handshake=9391;"

I can usually re-run the command and the issue is resolved. Typically with other R SQL packages there is an option to customize this parameter.

Thanks!

martinkabe commented 6 years ago

Good idea.

There is CommandTimeout = 0 implemented for all procs now.

I can put it as a parameter later.

Thanks.

jfontestad commented 6 years ago

Awesome. Let me know when it's available, so I can download the update.

Thank you!

jfontestad commented 6 years ago

Hello,

I don't know if this has anything to do with the Timeout, but I am getting this error: SqlException message: Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=15564; handshake=0;

I am however able to connect under a different R SQL package.

*I have updated to latest version.

martinkabe commented 6 years ago

Hi,

please, check following:

  1. An instance of the SQL Server Database Engine is not running.
  2. The SQL Server Browser service is not running.
  3. The TCP/IP is disabled.
  4. The server name was typed incorrectly.
  5. There are network problems.
  6. The TCP/IP port for the Database Engine instance is blocked by a firewall.
  7. The client and server are not configured to use the same network protocol.

Or could you try IP address instead of putting server name?

RSQLS uses SqlConnection class directly instead of ODBC so this might be an issue.

I'll check it as well.