MyISAM table locks in VICIdial, explained without the database jargon
What a MyISAM table lock is, why one long report can make a whole VICIdial floor wait, and why a bigger server doesn't fix it. Plain words, measured numbers.

Someone looked at your struggling VICIdial floor and said "it's MyISAM table locks". The processor graph looks calm, nobody explained what a lock is, and you're left wondering how one report can make a whole floor wait.
One ledger, one pen at a time
VICIdial stores its data in tables, a bit like sheets in a spreadsheet: one for Lead records, one for campaigns, one for the call log, and so on. The tables that hold its call records use a storage format called MyISAM.
MyISAM has one blunt rule. While anything is reading a table, the whole table is locked against changes. A job that wants to write, such as saving the result of a call, waits until the read is done.
Picture the call log as a single ledger on a desk. Glancing at it costs nothing. But while someone reads through it page by page, nobody can add a line, and everyone holding a pen stands in a queue until they're finished.
Why VICIdial feels it so much
A short read is harmless. When we replayed a real floor's database traffic at its normal pace, 99 in every 100 queries finished in 0.45 ms or less.
The catch is how busy the ledger is. VICIdial writes to the call log all day: every dial, every answer, every Disposition (the result an agent picks for a call) adds or changes a row. That floor ran 2,230 database queries a second.
So one read that takes several seconds in the middle of a shift doesn't just slow itself down. It stops every write that arrives behind it.
Reads get long for a few ordinary reasons: a report over a whole day, a stats tool re-reading the call log, a search that has no index to use, and tables that were never trimmed. On one floor the log tables had grown to 7 to 12.5 million rows each, and every read on them had that many rows to get through.
Three symptoms, one cause
flowchart TD
A[Long report or search] --> L[Call log locked]
B[Huge untrimmed table] --> A
C[Missing index] --> A
L --> D[Statuses save late]
L --> E[Call hand-off waits]
L --> F[Agent screens stop updating]
E --> G[Calls drop with agents ready]When the call log is locked, three things go wrong at once. Statuses take seconds to save, because the save is a write. Agent screens freeze, because they check in with the server every second and those check-ins queue.
And calls drop while agents are free. VICIdial uses the database to pick which ready agent gets each answered call, and the drop timer doesn't pause for a lock. A customer who waits too long counts against your Drop rate, while an agent sits ready with nothing to do.
Why a bigger server doesn't help
A lock is waiting, not working. While writes queue, the processor has little to do, which is why CPU and memory graphs look fine during the worst moments.
We tested that directly. Speed the same replay up to seven times the floor's load on a 16-core machine, and the database still never needed more than 3.1 cores, while 99% of queries finished in under a millisecond. What grew was the slow tail: the slowest query in a thousand went from 18 ms at normal pace to 290 ms at seven times, and at five and seven times that tail came from locks on the call log. The full replay results show each step.
Keeping every lock short
- Keep the tables small. VICIdial ships a log-archiving script, ADMIN_archive_log_tables.pl, that moves old rows out of the live tables. Run it on a schedule, outside shift hours.
- Give searches an index. The call log was missing a phone-number index, so a search by phone read the entire table. A stock job that scans for unanswered calls took 8 to 27% of database time on two floors, and an index cut that cost by about 95% in our test.
- Move long reports off the shift. Day-long counts and exports belong before or after the floor dials. How slow reports stall a whole system walks through spotting them.
- Keep tools off the live call log. Stats pages and add-ons that read it constantly hold the table more than anyone expects.
On our clusters the phone-number index is there from day one, and the database machine is sized for locks rather than cores. The cluster guide shows where that machine sits among the others.
Frequently asked
- No. Nothing is broken. Writes are waiting their turn, and they all go through the moment the long read finishes.
- No. A lock is time spent waiting, not working. In our replay the database never used more than 3.1 cores, even at seven times a live floor's load.
› Does a table lock mean the database has crashed?
› Will a bigger database server make locks go away?
If one server still carries your Campaign load, start on a plan. When you're planning separate machines, size a cluster with us and ask what will hold the locks before anyone sells you a bigger database server.
Related from VICIfast
About VICIfast
We run VICIdial servers for call centres, so you don’t have to. You get the dialer set up, secured and kept running — we handle the server, the updates and the backups. Bring your own phone carrier at no markup, or use VICIfast Voice, our own US calling and numbers, from $0.0085 a minute. From $49 a month per server.
Questions? Call +1 636 556 0022 and talk to someone who runs dialers.
Citing this article
VICIfast Engineering. “MyISAM table locks in VICIdial, explained without the database jargon”. VICIfast LLC, November 21, 2026. Retrieved from https://vicifast.com/blog/vicidial-myisam-table-locks-explained
Have questions?
Related posts
You might be interested in
Guides & tutorials
When a CRM polls VICIdial once per agent: the load you don't see
Guides & tutorials
Idle campaigns left active: the hidden database load in VICIdial
Guides & tutorials
Why searching a lead by phone number freezes VICIdial, and the missing index

Guides & tutorials
Keep the call log small: log archiving on a busy VICIdial database
VICIfast newsletter
Liked this? Get the next one in your inbox.
We ship the kind of stuff you just read - concrete, numbers-first, no drip. One email when a new post goes live. Unsubscribe in one click.
Comments
No comments yet - be the first.



