2026
Every post published in 2026, newest first. Pick a month to narrow it down.
- Posts
- 1,054
- Topics
- 114
- Reading time
- 128 h
- Active months
- 6
Posts 541–570 of 1,054 · November 5, 2026
Page 19 of 36
November 2026
802 postsThursday, November 5, 2026
30 of 124 posts
Fixed: "Snapshot isolation level is not supported" with MySql.Data
BeginTransactionAsync with IsolationLevel.Snapshot throws NotSupportedException in MySql.Data, because MySQL has no level by that name. REPEATABLE READ, its default, already reads from a snapshot. Real output from EF Core 10 and MySQL 9.7.
4 min readFixed: "Unknown column 's.Value' in 'field list'" with EF Core SqlQuery
SqlQuery<string> with FirstAsync failed with MySQL's Unknown column 's.Value', because EF Core wraps your SQL in a subquery and expects its output column to be called Value. Add AS Value. Real output from EF Core 10 and MySQL 9.7.
4 min readFixed: Minimal API Accepts an Undefined Enum Value in the Query String
?status=99 bound without any error, and the endpoint got an OrderStatus with no name. .NET's enum parsing allows it, and the docs say so. EnumDataType on an AsParameters record answers 400. Real output from ASP.NET Core 10.
4 min readFixed: "Failed to bind parameter" for an Enum in a Minimal API Query String
?status=placed gave a 400 with no explanation, and the log said Failed to bind parameter "Nullable<OrderStatus> status" from "placed". Query strings use the enum's exact name, unlike JSON. Accept a string when you want any case and a helpful message. Real output from ASP.NET Core 10.
5 min readFixed: "Duplicate entry for key 'order_lines.IX_order_lines_OrderId_ProductId'" When a List Repeats a Product in a Minimal API
A client listed the same product twice in one order, and the API answered 500 with a MySQL duplicate key error. The request is invalid, so it should get a 400. IValidatableObject checks the list before any database work. Real output from ASP.NET Core 10 and MySQL 9.7.
4 min readFixed: "Check constraint 'CK_products_QuantityOnHand' is violated" with ExecuteUpdateAsync in EF Core and MySQL
Two simultaneous sales passed the stock check in C#, and the second ExecuteUpdateAsync hit MySQL's CHECK constraint, error 3819, so buyers got a 500. The constraint did its job. Move the condition into the UPDATE, and they get a 409. Real output from EF Core 10 and MySQL 9.7.
4 min readFixed: Enum Returned as a Number in a Minimal API's JSON
My API answered "type": 0, while the database held the word Receipt. System.Text.Json writes enums as numbers by default. One JsonStringEnumConverter in ConfigureHttpJsonOptions fixes every endpoint. Real output from ASP.NET Core 10.
4 min readFixed: IExceptionHandler Exceptions Aren't Logged in ASP.NET Core 10
My exception handler answered 503 correctly, and the log had no record of the exception from ASP.NET Core. Since .NET 10, the middleware stays quiet when TryHandleAsync returns true. SuppressDiagnosticsCallback brings it back. Real output from ASP.NET Core 10.
4 min readFixed: "Connection must be valid and open to rollback transaction" with MySql.Data
A catch block called RollbackAsync after the commit had already worked, and that hid the real error behind this message. Let await using roll back, and keep work that can fail after the commit out of that try. Real output from EF Core 10 and MySQL 9.7.
5 min readFixed: "Connection must be valid and open to commit transaction" with MySql.Data
A second CommitAsync on the same transaction failed with this message, which sounds like a connection problem. The first commit had worked, and it had closed the connection. Commit once. Real output from EF Core 10 and MySQL 9.7.
4 min readFixed: "The connection is already in a transaction and cannot participate in another transaction" in EF Core
A helper method started its own transaction while the caller already had one open on the same DbContext, and EF Core refused. Let one place own the transaction, and let the helpers join it. Real output from EF Core 10 and MySQL 9.7.
5 min readFixed: False "DbUpdateConcurrencyException" on Stock with a Concurrency Token in EF Core
Using a Version concurrency token on a stock quantity stopped overselling, and it also refused orders with plenty of stock: 3 of 5 requests got a 409 with 98 left. A conditional UPDATE has no false conflicts. Real output from EF Core 10 and MySQL 9.7.
5 min readFixed: Two Requests Buy the Last Item in EF Core (Overselling)
With one left in stock, five simultaneous orders all succeeded, because each read the quantity, checked it in C#, and then wrote it. A transaction didn't help. A conditional UPDATE did: one order succeeded, and four got a 409. Real output from EF Core 10 and MySQL 9.7.
6 min readFixed: EF Core Retry Places the Same Order Twice After a Lost COMMIT
The connection dropped after MySQL committed and before the app heard. EF Core retried, and one request became two orders, with stock taken twice. A key per request, checked at the start of every attempt, makes the retry return the first order. Real output from EF Core 10 and MySQL 9.7.
6 min readFixed: A Retried EF Core Transaction Saves the Row Twice
One request created two rows after a retry, because the failed attempt left its entity in the scoped DbContext as Added, so the next attempt saved it too. ChangeTracker.Clear at the start of each attempt fixes it. Real output from EF Core 10 and MySQL 9.7.
4 min readFixed: "Too many connections" from "Authentication to host failed" with MySql.Data
MySql.Data reports MySQL's connection limit as an authentication failure: Authentication to host failed with message: Too many connections. Your password is fine. See who holds the connections, then fix that or the limit. Real output from .NET 10 and MySQL 9.7.
5 min readFixed: "Server shutdown in progress" in EF Core with MySQL
A statement running while MySQL stopped failed with MySqlException: Server shutdown in progress, error 1053, and a 500. List 1053 in your retries, and the same request waits through the restart and answers 200. Real output from EF Core 10 and MySQL 9.7.
4 min readFixed: "Fatal error encountered during command execution" and "Reading from the stream has failed" with MySql.Data
These two MySql.Data messages mean the connection dropped while a statement ran. They carry error number 0, so EF Core's retries skip them unless you list it. Retry only what's safe to repeat. Real output from EF Core 10 and MySQL 9.7.
5 min readFixed: "NullReferenceException" at MySqlCommand.ExecuteNonQueryInternalAsync After KILL QUERY
Stopping an EF Core ExecuteUpdateAsync with KILL QUERY gave a NullReferenceException from MySql.Data, and a 500, where MySQL itself reports error 1317. Here's why, what it tells you when you see it in your logs, and what to run instead. Real output from EF Core 10 and MySQL 9.7.
5 min readFixed: "NullReferenceException" at NativeDriver.ExecutePacketAsync During a MySQL Restart in EF Core
With retries on, 8 of 96 requests failed with a NullReferenceException inside MySql.Data while MySQL restarted, because a retry used a connection the driver had left marked as open. A small custom execution strategy closes it first. Real output from EF Core 10 and MySQL 9.7.
7 min readFixed: "RetryLimitExceededException: The maximum number of retries (3) was exceeded" in EF Core with MySQL
EF Core retried three times in about 4 seconds, then gave up with RetryLimitExceededException, and the client got a 500. The real error is the inner exception. Fix what's behind it, and turn this one into a 503 with Retry-After. Real output from EF Core 10 and MySQL 9.7.
5 min readFixed: "MySqlException: Lock wait timeout exceeded" with EF Core and MySQL
An EF Core write failed with Lock wait timeout exceeded, wrapped in a DbUpdateException from SaveChanges, or raw from ExecuteUpdateAsync. Set a short limit for your connections, answer 503 with Retry-After instead of 500, and find what's holding the row. Real output from EF Core 10 and MySQL 9.7.
6 min readFixed: "MySqlException: Deadlock found when trying to get lock" in EF Core
Half of 30 simultaneous orders failed with a deadlock, because each processed its products in the order the client sent them. One OrderBy before the loop took it from 15 failures to none, and listing error 1213 covers the rare one that's left. Real output from EF Core 10 and MySQL 9.7.
6 min readFixed: "error CS8031: Async lambda expression converted to a 'Task' returning delegate cannot return a value"
Passing an async lambda that returns different result types to ExecuteAsync fails with CS8031, because the compiler can't infer one return type, so it picks the overload with none. State the lambda's return type. Real output from C# 14 and .NET 10.
4 min readFixed: "The configured execution strategy 'MySQLRetryingExecutionStrategy' does not support user-initiated transactions" in EF Core
With retries on, BeginTransactionAsync followed by any statement throws this InvalidOperationException, because EF Core can't replay a transaction it didn't start. Wrap the whole transaction in CreateExecutionStrategy().ExecuteAsync. Real output from EF Core 10 and MySQL.
5 min readFixed: "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool" with MySql.Data
A plain request failed after 15 seconds, because every pooled connection was in use. Here the connections were held by requests that had hung, and MySQL showed them all idle. Find out what's holding them, and fix that, before raising Maximum Pool Size. Real output from .NET 10.
7 min readFixed: A Request Never Answers When a MySQL Statement Runs Longer Than CommandTimeout (MySql.Data)
With MySql.Data, an async statement that outlasts CommandTimeout doesn't time out: the request never answers, its connection stays out of the pool, and in a transaction it keeps its row locks. Set CommandTimeout to 0, and limit the wait on the server. Real output from EF Core 10 and MySQL 9.7.
8 min readFixed: EF Core EnableRetryOnFailure Doesn't Retry MySQL Errors with Oracle's MySql.EntityFrameworkCore
With Oracle's MySQL provider, EnableRetryOnFailure with an empty errorNumbersToAdd retries nothing: a deadlock and a stopped server both fail on the first try, because MySqlException never reports itself as transient. List the error numbers, and the retries start. Real output from EF Core 10.
7 min readFixed: "ERROR 1229 (HY000): Variable is a GLOBAL variable and should be set with SET GLOBAL" in MySQL
SET SESSION innodb_print_all_deadlocks failed with ERROR 1229, because the setting has only one value, for the whole server. Use SET GLOBAL, from an administrator's account. Real output from MySQL 9.7.
3 min readFixed: "ERROR 1044 (42000): Access denied for user to database" in MySQL
Connecting with a database on the command line failed with ERROR 1044: the password was right, and the account has no rights on that database. Leave the database out, connect to one it can use, or grant it the rights. Real output from MySQL 9.7.
4 min read