2035
MariaDBERRORCriticalServerMEDIUM confidence
Too many delayed insert handler threads
Production Risk
Low — only affects legacy INSERT DELAYED usage.
What this means
The number of active INSERT DELAYED handler threads has reached the max_delayed_threads limit. New INSERT DELAYED statements are rejected until existing threads complete.
Why it happens
- 1max_delayed_threads limit reached.
- 2High volume of INSERT DELAYED statements overwhelming the delayed insert thread pool.
How to reproduce
trigger — this will error
trigger — this will error
INSERT DELAYED INTO t VALUES (1); -- when max_delayed_threads is exhausted
expected output
ERROR 2035 (HY000): Too many delayed threads in use.
Fix 1
Increase max_delayed_threads
Increase max_delayed_threads
SET GLOBAL max_delayed_threads = 50;
Why this works
Allows more concurrent delayed insert handler threads.
Fix 2
Replace INSERT DELAYED with regular INSERT and a connection pool
Replace INSERT DELAYED with regular INSERT and a connection pool
INSERT INTO t VALUES (1);
Why this works
Modern connection pools handle concurrency without the delayed mechanism.
What not to do
✕
Version notes
Sources
Official documentation ↗
MySQL 5.6 — 2035 ER_TOO_MANY_DELAYED_THREADS
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev