You are viewing limited content. For full access, please sign in.

Question

Question

Azure SQL PaaS intermittent 08S02 errors

asked on May 17, 2021

We recently moved our Laserfiche 11 instance to an Azure VM and are using a SQL PaaS DTU-based instance on the backend. Our users all run the Windows client. Our database is about 2.5 GB.

About a dozen times a day we're getting this error in the Laserfiche->ContentRepository event log - "[Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by the remote host." Most often (but not always) the error message indicates the function is SysEntryOpenListingEx and the SQL executed is testing for the existence of the #tmplisting table and creating if it doesn't exist.

When this happens the end-user gets a little error message box and closes it out, retries the operation, and everything is fine. So it's not the end of the world but we'd kinda like to figure out why this is happening.

Neither our Server 2019 compute instance nor our SQL instance are indicating any kind of usage limits are even close to being reached.

I also made sure we're running the latest Server 2019 updates and just updated the ODBC Driver 17 to its latest version.

Does anybody have any insight on this, or anything tips on what to try to narrow this error down?

 

1 0

Answer

APPROVED ANSWER
replied on June 1, 2021

[6/1/2021] Update for anyone else reading this:

The LFS Azure SQL connection pooling timeout hotfix that was available for 10.4.3 is now also available for 11.0. For the time being, please open a support case to receive the LFS 11 hotfix.

1 0

Replies

replied on May 20, 2021

I think I'm getting a lead on it. I've been able to replicate the above a couple of times now. Both times I've left the Laserfiche Windows client open and idle for about half an hour. Then I come back and click on another folder.

I'm guessing it tries to re-use a database connection that's been left open for more than 30 minutes, which is the max that SQL Azure will keep an idle connection open (per MSFT).

In regards to how LFS manages its connections to the database server, does that sound likely?

2 0
replied on May 20, 2021

That sounds plausible, though LFS uses SQL connection pooling on the backend so to the best of my knowledge LFS SQL connections aren't associated 1:1 with client sessions. While it's obviously preferable if we can resolve this on the LFS side, one possible workaround to prevent users encountering the issue could be to set a 30-minute (or less) Idle Disconnect inactivity timeout. 

0 0
replied on May 21, 2021

Well that didn't seem to help but hey it's good to get people logged out when they're not using the system :) Thanks for your help, I'm going to do some more poking around at the network level.

0 0
replied on May 24, 2021

Just to rule out the Azure SQL database killing off stale connections after 30 minutes, is there any way to modify the database pool options for connection timeout or lifetime? Maybe in the registry or a config file?

0 0
replied on May 25, 2021

Hi Mason,

I appreciate your troubleshooting efforts! The connection pooling is all controlled through the LFS application code itself and does not have any exposed configuration options. In the past for a similar sounding connection issue with LFS 10.4.x and Azure SQL we issued a custom hotfix in the form of a modified LFS DLL with updated connection pooling logic. I don't know if the changes in that hotfix made it into the mainline Laserfiche Server 11 release, as they had a minor negative performance impact when used with normal SQL Server on a VM.

Do you know your support case #? If so, I can follow up on the status.

0 0
replied on May 26, 2021

Thanks for the followup, I've sent this post to our VAR and they'll open up a case with Laserfiche. This has been interesting (if not a bit frustrating, ha) to debug!

0 0
APPROVED ANSWER
replied on June 1, 2021

[6/1/2021] Update for anyone else reading this:

The LFS Azure SQL connection pooling timeout hotfix that was available for 10.4.3 is now also available for 11.0. For the time being, please open a support case to receive the LFS 11 hotfix.

1 0
replied on June 2, 2021

It's been several hours since staff has started using the server with the hotfix applied. So far so good!

I'll make a note to look for this in the release notes and hold off updating when the next minor version comes out.

Thanks for digging into this. SQL Server PaaS is a big reason we moved to Azure.

Cheers!

1 0
replied on May 20, 2021

OK thanks, we've got a support ticket going with our VAR.

1 0
replied on May 17, 2021 Show version history

Hi Mason, 

I'm sorry to hear you're having this issue with Azure SQL. Could you please open a support case and reference this post? We can better assist from there.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.