You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix and clarify details on performance issues and dependencies
Updated the troubleshooting documentation to fix typos, improve clarity, and address performance issues linked EF Core, Azure, and connection resiliency. Added detailed guidance and mitigations for memory usage, query execution plans, transient failovers, and version-specific dependency issues.
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/troubleshooting.md
+50-8Lines changed: 50 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,12 +170,13 @@ version used.
170
170
## Performance Issues
171
171
172
172
In some installations, upgrading .NET and IdentityServer has caused performance issues. Since the IdentityServer and
173
-
.NET version upgrades typically are done on the same time, it is sometimes hard to tell what the root cause is
173
+
.NET version upgrades typically are done at the same time, it is sometimes hard to tell what the root cause is
174
174
for the performance degradation. When working with installations to find the root cause, there are some dependencies
175
175
that have been found to cause issues in specific verisons.
176
176
177
177
### PostgreSQL Pooling
178
-
There are issues with some versions of the PostgreSQL client library that gives large memory consuption. Enabling
178
+
179
+
There are issues with some versions of the PostgreSQL client library that gives large memory consumption. Enabling
179
180
pooling on the operational store has solved this in the past:
180
181
181
182
```csharp
@@ -189,16 +190,57 @@ pooling on the operational store has solved this in the past:
189
190
```
190
191
191
192
### Entity Framework Core & Microsoft SQL OPENJSON
193
+
192
194
Entity Framework Core version 8 introduced a new behaviour when creating `WHERE IN()` sql clauses. Previously the
193
-
possible values where supplied as parameters, which meant that the query text was dependendent on the number of items
195
+
possible values were supplied as parameters, which meant that the query text was dependent on the number of items
194
196
in the collection. This was solved by sending the parameters as a JSON object and using `OPENJSON` to read the parameters.
195
-
While this enabled query plan caching, it unfortunately caused MSSQL Server to generate bad query execution plans.
197
+
While this enabled query plan caching, it unfortunately caused Microsoft SQL Server to generate bad query execution plans.
196
198
197
199
Please see [this EF Core GitHub Issue](https://github.com/dotnet/efcore/issues/32394#issuecomment-2266634632) for information
198
200
and possible mitigations.
199
201
200
-
### Azure
201
-
The `Azure.Core` package versions 1.41.0 and prior had an issue that caused delays when accessing Azure resources.
202
+
### Microsoft Azure
203
+
204
+
The `Azure.Core` package versions `1.41.0` and prior had an issue that caused delays when accessing Azure resources.
202
205
This could be Azure blob storage or key vault for data protection or Azure SQL Server for stores, especially if managed
203
-
identities are used. This package is typically not referenced directly, but brought in as a transient dependency
204
-
through other packages. Ensure to use version 1.42.0 or later if you are hosting on Azure.
206
+
identities are used. This package is typically not referenced directly but brought in as a transient dependency
207
+
through other packages. Ensure to use version `1.42.0` or later if you are hosting on Azure.
208
+
209
+
### Entity Framework Core, Microsoft.Data.SqlClient, and SqlServerRetryingExecutionStrategy
210
+
211
+
As more developers migrate their database-powered application to the cloud,
212
+
they will need to handle intermittent connection failures. In most cases, these transient connection failures occur and resolve in a short period of time, allowing the application to self-correct and continue processing requests. The strategy is known as **connection resiliency**.
213
+
214
+
In recent versions of Entity Framework Core and `Microsoft.Data.SqlClient`, you can enable this retry strategy explicitly, but in the case of `Microsoft.Data.SqlClient`, when operating in a cloud environment, this strategy is enabled by default or defined in the connection string.
In most cases, this is a _good feature to have enabled_ but there are drawbacks that can cause severe system degradation.
227
+
228
+
- Enabling retry on failure causes Entity Framework Core to buffer the result set. Significantly increasing memory requirements and causing garbage collection pauses.
229
+
- Some versions of `Microsoft.Data.SqlClient` call `Thread.Sleep` that can lock threads for up to **_10 seconds_**. This can lead to thread exhaustion and server unresponsiveness. We've isolated this issue to versions.
230
+
231
+
| Microsoft.EntityFrameworkCore.SqlServer | Microsoft.Data.SqlClient | Status |
0 commit comments