VPN times out when waiting for SQL queries

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
jrale
Posts: 2
Joined: Wed Jul 13, 2016 2:59 am

VPN times out when waiting for SQL queries

Post by jrale » Wed Jul 13, 2016 3:09 am

Hello,

We are having an issue where any SQL queries we issue to a SQL server inside our SoftEther VPN work when less than 40 seconds, but 40+ seconds will result in the following message: "A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)"

This works:
WAITFOR DELAY '00:00:39';SELECT 1;

This does not:
WAITFOR DELAY '00:00:40';SELECT 1;

Basically any query that takes longer than 39 seconds will cancel and return an error. Running the query on another server inside the VPN against the SQL server succeeds as well as if we open a port to allow a straight connection to the database from the internet so the issue definitely seems localized to the VPN. The VPN server is running on Windows Server 2012 R2 if that makes any difference. Is there some timeout setting we can adjust or something else to look for?

thisjun
Posts: 2210
Joined: Mon Feb 24, 2014 11:03 am

Re: VPN times out when waiting for SQL queries

Post by thisjun » Thu Feb 23, 2017 6:25 am

Are there any router or firewall or SecureNAT or localbridge between the SQL client and the SQL server?

nerdamigo
Posts: 2
Joined: Tue Mar 07, 2017 1:53 am

Re: VPN times out when waiting for SQL queries

Post by nerdamigo » Tue Mar 07, 2017 1:55 am

I am also experiencing this issue - I'm connecting from a windows 10 machine to softether running on win 2016.

SecureNat is enabled. What other information can I provide that would help diagnose this issue?

thisjun
Posts: 2210
Joined: Mon Feb 24, 2014 11:03 am

Re: VPN times out when waiting for SQL queries

Post by thisjun » Thu Mar 16, 2017 6:40 am

Could you try that the SQL Server PC connect to the virtual hub and client queries with virtual IP address?

nerdamigo
Posts: 2
Joined: Tue Mar 07, 2017 1:53 am

Re: VPN times out when waiting for SQL queries

Post by nerdamigo » Thu Mar 16, 2017 3:22 pm

What?

I have no idea what you're asking me to do - the SQL Server is in the same network as the VPN server, and the clients are connecting to the VPN server and acquiring an IP from the secure nat service.

jrale
Posts: 2
Joined: Wed Jul 13, 2016 2:59 am

Re: VPN times out when waiting for SQL queries

Post by jrale » Fri Mar 17, 2017 3:50 pm

thisjun wrote:
> Could you try that the SQL Server PC connect to the virtual hub and client
> queries with virtual IP address?

This works for me. The internal network is 10.0.0.0/24; the VPN server has an IP of 10.0.0.1 and the SQL server is 10.0.0.3. The SecureNAT on the VPN is set to 192.168.1.0/24 with the server at 192.168.1.1 and the VPN clients are issued DHCP from 192.168.1.100-192.168.1.200. When a client connects to the VPN and queries the SQL server against 10.0.0.3, it "works" except it times out for queries over 40 seconds. If I connect the SQL server to the VPN as a client and then connect to 192.168.1.101 (the DHCP address the SQL server received) from another VPN client, then I can run queries for minutes and it works perfectly fine.

So is there some setting related to SecureNAT that needs adjustment to allow connections to the normal 10.0.0.3 address to not time out when running for 40+ seconds? I really don't want to have to loop the SQL server back into it's own network and have a separate IP that VPN clients need to use instead of the normal address.

trevor
Posts: 1
Joined: Wed Oct 03, 2018 7:15 pm

Re: VPN times out when waiting for SQL queries

Post by trevor » Fri Nov 16, 2018 2:40 am

Hi all,

Has anyone found a (better) solution to the timeout issue when running SQL queries that are longer than 40 seconds? We've hit the same roadblock making SoftEther unusable for our SQL devs. I'm hoping there's something we can adjust to get it working because other than this, SoftEther has been excellent.

Thanks,
Trevor

ivankamart
Posts: 1
Joined: Fri Nov 09, 2018 1:29 am
Contact:

Re: VPN times out when waiting for SQL queries

Post by ivankamart » Sat Nov 17, 2018 3:02 am

I found this solution, you can see more here

Code: Select all

reddit.com/r/networking/comments/6hc4qm/slow_sql_queries_over_vpn/

Post Reply