VoIP.info Troubleshooting

Asterisk Sorcery cache change is missing, stale or too broad

Trace configuration ownership, mapping order, cache mode, action scope, backend retrieval and the first effective object before flushing more state.

Reviewed 2026-10-23Current Asterisk branch-23-generated Sorcery memory-cache actions, Sorcery caching and overview guidance, performance-tuning, reload-event, AMI and ARI push-configuration documentation reviewed October 23, 2026; installed release, loaded module, Sorcery mapping order, cache name and mode, object population, authoritative backend, database transaction, configuration owner, manager permissions, node scope, background refresh, reload behavior, call-path lookup and resource impact remain deployment specific; no PBX, module, cache, database, configuration object, manager account, session, action, reload, packet, media stream or live call was inspected or testedAdvancedDocumentation based · not lab tested

Freeze one object and its configuration owner

Record the responding node, installed branch, relevant module, exact cache name, object type and ID, Sorcery mapping order, cache options, authoritative backend, change transaction and symptom time. Preserve a pre-change cache show or dump and a safe backend read.

Classify the first divergence: backend write absent; wrong database or tenant; cache mapping not loaded; object never cached; wrong cache name; object action rejected; full-backend mode blocks object expiry; stale value returned before background refresh; populate failed or was incomplete; later PBX behavior used another object or node.

Separate backend commit from cache invalidation

Prove that the authoritative owner committed the expected row or object before manipulating memory. A FreePBX Submit or Apply Config result, database success, ARI push response, file generation, Asterisk reload and cache mutation are separate lifecycle boundaries.

If the backend is wrong, correct it through its supported owner. Repeated expiry can only force more reads of the same wrong state and may add database load without changing effective behavior.

Verify cache mode before choosing the action

For an individually populated cache, expire one object to force a later miss or mark it stale to retain the old value while refresh occurs. If using stale with Reload: true, verify the immediate backend retrieval separately. Without immediate reload, trigger only the authorized normal lookup and allow for asynchronous replacement.

For full_backend_cache=yes, do not treat failure of SorceryMemoryCacheExpireObject as a missing object or permission failure; current documentation says the action is unavailable. Use a planned full populate or whole-cache expiry only when that broader scope is justified.

Correlate AMI response, backend work and cache result

Retain the exact request, unique ActionID and response, but do not end the trace at action acceptance. For populate or background refresh, capture backend availability, query completion, returned rows, parse errors, cache count and the target object after the operation.

A stale object can be returned to the triggering request before its replacement arrives. Conversely, an expired object can disappear while the backend lookup fails. These outcomes can look similar in a dashboard but require different corrections.

Reject broad flushing as a diagnostic shortcut

Whole-cache stale, expire and populate operations affect every object in the named cache. Compare expected object count, backend capacity, latency budget and dependent traffic before use. In clustered deployments, an action on one node does not prove that peer-node caches changed.

Do not restart Asterisk or reload unrelated modules merely to collapse uncertainty. Those actions can alter caches, transports, registrations and calls simultaneously, destroying the evidence needed to identify the first divergence.

Confirm the first consumer and retest once

After the narrow correction, retrieve the exact object through the normal path and compare the effective fields on the same node. Then verify only the first dependent decision: endpoint selection, authentication object, identify match, AoR lookup, registration or another named consumer. Validate call signaling and media separately if authorized.

Record the before-and-after object, cache state, backend state and timestamps. No PBX, module, cache, database, configuration object, manager action, reload, packet, media stream or live call was inspected or tested.

Sources & applicability

Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.

Examples require adaptation to your topology. No live PBX or hardware testing is claimed.