Global file lock contention causing latency spikes under concurrent writes in Contao
0 reputation · 03 Jul 2022, 08:58 UTC
The objective is to assess how the global file lock influences request latency when multiple concurrent requests write to the same database table in Contao.
Contao's global lock serializes all file operations, and because no per-request transaction isolation level can be set, concurrent writes may contend for the same table, leading to latency spikes and possible SQLSTATE[40001] deadlocks.
What impact does this lock have on overall request latency under high concurrency, and can the lock be tuned or replaced to reduce the observed delays, and how should deadlock handling be managed?