November 2026
Every post published in November 2026, newest first. Pick a day to jump straight to it.
- Posts
- 1,837
- Topics
- 113
- Reading time
- 190 h
- Active days
- 20
Posts 1,591–1,620 of 1,837 · November 5, 2026
Page 54 of 62
Thursday, November 5, 2026
30 of 124 posts
Fixed: "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 readFixed: "ERROR 1356 (HY000): View 'sys.innodb_lock_waits' references invalid table(s) or column(s) or function(s)" in MySQL
A SELECT from a sys view failed with ERROR 1356, which sounds like a broken view. Here it's a missing right: the account could read the view, and not run the functions it calls. GRANT EXECUTE ON sys.* fixes it. Real output from MySQL 9.7.
4 min readFixed: "ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES" in MySQL
GRANT PROCESS ON inventory.* failed with ERROR 1221, because PROCESS is a server-wide privilege and can't be granted on one database. Grant it on *.* instead. Real output from MySQL 9.7.
3 min readFixed: Warning 1751: "The creation of some temporary tables could not be rolled back" in MySQL
A ROLLBACK reported 1 warning: the temporary table created inside the transaction stayed behind. The rest of the transaction was rolled back as normal. Create temporary tables before you start, and the warning goes away. Real output from MySQL 9.7.
4 min readFixed: Deadlock When a MySQL Transaction Inserts a Child Row Before Updating the Parent
Two transactions insert a child row and then update the parent, and one fails with ERROR 1213. The foreign key check takes a shared lock on the parent, so both hold it and neither can upgrade. Update the parent first, and the deadlock goes away. Real output from MySQL 9.7.
5 min readFixed: Deadlock on INSERT After SELECT FOR UPDATE on a Missing Row in MySQL
Check that a row doesn't exist with FOR UPDATE, then insert it: two sessions doing that deadlock with ERROR 1213. Each holds a gap lock the other's INSERT needs. Skip the check, insert directly, and let a unique index decide. Real output from MySQL 9.7.
5 min readFixed: EXPLAIN UPDATE Says "not executable by iterator executor" in MySQL
In MySQL 9.7, EXPLAIN UPDATE prints <not executable by iterator executor> and nothing useful, because the default format is TREE. Ask for FORMAT=TRADITIONAL, and you get the plan: which index it uses, and how many rows it reads. Real output.
4 min readFixed: "ERROR 1040 (HY000): Too many connections" in MySQL
A new connection was refused with ERROR 1040, because the server was already at max_connections. See who's using them, end what's stuck, and raise the limit if the load is real. Here's each step on MySQL 9.7, with the reserved slot for administrators that makes it possible.
4 min readFixed: "ERROR 1238 (HY000): Variable is a read only variable" in MySQL
Setting innodb_rollback_on_timeout failed with ERROR 1238, because it can only be set when MySQL starts. In Docker Compose that's a command line in compose.yaml. Here's the fix on MySQL 9.7, and the proof that a lock wait timeout then rolls back the whole transaction.
4 min readFixed: "ERROR 1094 (HY000): Unknown thread id" in MySQL
KILL failed with ERROR 1094, because no connection has that ID: it has already ended, or the number came from the wrong column. List the connections again, and use PROCESSLIST_ID, not THREAD_ID. Real output from MySQL 9.7.
3 min readFixed: "ERROR 1095 (HY000): You are not owner of thread" in MySQL
KILL failed with ERROR 1095, because the account can only stop its own connections. Run it from an account with CONNECTION_ADMIN, or ask whoever owns the connection to finish. Real output from MySQL 9.7.
3 min readFixed: "ERROR 2013 (HY000): Lost connection to MySQL server during query"
The mysql client reported ERROR 2013, reconnected by itself, and carried on, while my open transaction was silently rolled back. The cause here was a KILL from another session. Here's how to tell what happened to your work, and what to do next. Real output from MySQL 9.7.
5 min readFixed: "ERROR 1317 (70100): Query execution was interrupted" in MySQL
A statement ended with ERROR 1317 because someone, or something, ran KILL QUERY on it. The connection is fine, and the statement didn't happen. Find out what stopped it, deal with the reason it was stuck, and run it again. Real output from MySQL 9.7.
4 min readFixed: ROLLBACK Doesn't Undo My Changes After CREATE TABLE in MySQL
An UPDATE in a transaction, then a CREATE TABLE, then ROLLBACK, and the UPDATE stayed. CREATE TABLE committed it, silently, as ALTER TABLE, TRUNCATE and others do. Keep structure changes out of transactions. Real output from MySQL 9.7.
4 min readFixed: ALTER TABLE Hangs on "Waiting for table metadata lock" in MySQL
An ALTER TABLE sat at Waiting for table metadata lock, with nothing wrong in the statement. An idle transaction had read the table and never finished, and a plain SELECT is enough to hold the lock. Here's how to find it with sys.schema_table_lock_waits on MySQL 9.7, and end it.
5 min readFixed: A MySQL SELECT in a Transaction Returns an Old Value
Inside a transaction, a SELECT kept returning 50 after another session had saved 40. That's REPEATABLE READ's snapshot working as designed. Commit and read again, use FOR UPDATE to read the newest row, or switch to READ COMMITTED. Real output from MySQL 9.7.
5 min read