Got a complaint from the user office that we were flooding the 4D server with requests.
It looks like if there's an error in the worker, it keeps retrying over and over. We need to block this from happening on error.
Here's the log from the error. I think it's file permissions.
access-worker-1 | │ ❱ 243 │ │ cursor.executescript(stage_push_sql) │
access-worker-1 | │ 244 │ │ │
access-worker-1 | │ 245 │ │ # load db IDs for items into memory │
access-worker-1 | │ 246 │ │ cursor.execute("SELECT id, name FROM stage_tags") │
access-worker-1 | ╰──────────────────────────────────────────────────────────────────────────────╯
access-worker-1 | OperationalError: attempt to write a readonly database
access-worker-1 | ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
access-worker-1 | │ /app/scripts/sync_scheduler.py:181 in main │
access-worker-1 | │ │
access-worker-1 | │ 178 │ scheduler = BlockingScheduler(timezone="UTC") │
access-worker-1 | │ 179 │ │
access-worker-1 | │ 180 │ # Prime the tags DB on service startup. │
access-worker-1 | │ ❱ 181 │ sync_once( │
access-worker-1 | │ 182 │ │ esaf_db_path=resolved_esaf_db_path, │
access-worker-1 | │ 183 │ │ tags_template=resolved_tags_template, │
access-worker-1 | │ 184 │ │ generated_tags_yaml=resolved_generated_tags_yaml, │
access-worker-1 | │ │
access-worker-1 | │ /app/scripts/sync_scheduler.py:93 in sync_once │
access-worker-1 | │ │
access-worker-1 | │ 90 │ ) │
access-worker-1 | │ 91 │ │
access-worker-1 | │ 92 │ t0 = time.monotonic() │
access-worker-1 | │ ❱ 93 │ subprocess.run( │
access-worker-1 | │ 94 │ │ [ │
access-worker-1 | │ 95 │ │ │ "python", │
access-worker-1 | │ 96 │ │ │ "-m", │
access-worker-1 | │ │
access-worker-1 | │ /usr/local/lib/python3.12/subprocess.py:571 in run │
access-worker-1 | │ │
access-worker-1 | │ 568 │ │ │ raise │
access-worker-1 | │ 569 │ │ retcode = process.poll() │
access-worker-1 | │ 570 │ │ if check and retcode: │
access-worker-1 | │ ❱ 571 │ │ │ raise CalledProcessError(retcode, process.args, │
access-worker-1 | │ 572 │ │ │ │ │ │ │ │ │ output=stdout, stderr=stderr) │
access-worker-1 | │ 573 │ return CompletedProcess(process.args, retcode, stdout, stderr) │
access-worker-1 | │ 574 │
access-worker-1 | ╰──────────────────────────────────────────────────────────────────────────────╯
access-worker-1 | CalledProcessError: Command '['python', '-m',
access-worker-1 | 'splash_tiled.access_control.tiled_tags', 'compile', '--esaf-sqlite-path',
access-worker-1 | '/app/tags/esafs.db', '--output-sqlite-path', '/app/tags/compiled_tags.db',
access-worker-1 | '--tag-definitions-path',
access-worker-1 | '/app/src/splash_tiled/access_control/tag_definitions_stub.yaml',
access-worker-1 | '--generated-yaml-path', '/app/tags/tag_definitions.generated.yml']' returned
access-worker-1 | non-zero exit status 1.
access-worker-1 | [2026-09-08T17:05:43.658340+00:00] Sync started
Got a complaint from the user office that we were flooding the 4D server with requests.
It looks like if there's an error in the worker, it keeps retrying over and over. We need to block this from happening on error.
Here's the log from the error. I think it's file permissions.