Page 1 of 1

Unknown Error Code 100 - The connection is closed.

PostPosted: Wed Oct 13, 2021 7:58 pm
by ellenmeserow
Looking for help with "Unknown Error Code 100 - The connection is closed." Our set up is running our main servoy solution as a module that has all of our forms in it so we can show our app within an iframe in an external application. Our settings for Servoy Server are attached. We have updated to the newest version of the mssql driver and unsure why we keep getting this error. It happens to lots of different queries and not sure what to do to help eliminate it.

ConnectionClosed.jpg
ConnectionClosed.jpg (557.07 KiB) Viewed 6941 times

ServerSettings.jpg
ServerSettings.jpg (225 KiB) Viewed 6941 times

Re: Unknown Error Code 100 - The connection is closed.

PostPosted: Tue Oct 19, 2021 5:59 pm
by sbutler
Essentially, whats probably happening is SQL Server is closing the connection, but the Servoy connection pool doesn't realize it. So when it goes to ask for a connection, it gets an already closed one from the pool. Some things to try, one or both.

- Set the Connections Idle Timeout to match the idle timeout in SQL Server (or a little less), so it expires from the idle pool before SQL Server closes it.
- Change validation type to Query based validation with "SELECT 1" as the query. So when it grabs a connection form the pool, it runs that query first to see if its still valid, which will fail when SQL Server has already closed it, so it will try to grab another.

Mostly likely the first option of lowering the idle timeout will do the trick. -1 means never so its just leaving them in the pool forever, but then when it asks for one, SQL Server closed it already.

Re: Unknown Error Code 100 - The connection is closed.

PostPosted: Mon Oct 25, 2021 8:42 pm
by ellenmeserow
Scott! Thank you! I thought I had replied but I just came back and it wasn't here. Those didn't work, and we went further with our testing and proved it has something to do with the VPN between our servoy server and our sql server. Any tips if that is the case?

Re: Unknown Error Code 100 - The connection is closed.

PostPosted: Wed Oct 27, 2021 4:16 pm
by sbutler
a VPN between Servoy and SQL Server is generally not a good idea and could cause random disconnects, like you are seeing. Essentially the VPN probably drops out and breaks the connection so when Servoy tries to grab a connection from the idle pool, its closed already.

Servoy and the SQL Server should be on the same local network and not connected over the WAN via VPN. If they are on the same local network, and a VPN is being used for security reasons, there are better options like using vlans for network segmentation.