Skip to content

apply_osc_to_db.sh / update_from_dir get stuck when e.g. "node in .osc not found in loaded data" #778

@SomeoneElseOSM

Description

@SomeoneElseOSM

See #774 for context. I've currently loaded an extract of "Britain and Ireland" from a couple of days ago and am trying to apply minutely updates.

apply_osc is started like this:

    apply_osc)
        ionice -c 2 -n 7 nice -n 17 nohup "${EXEC_DIR}/apply_osc_to_db.sh" \
            "${DIFF_DIR}" auto --meta=no \
            >> "${LOG_DIR}/apply_osc_to_db.out" 2>&1 &
        ;;

and from looking at that script it's clear that it is supposed to call update_from_dir and retry on failure. Unfortunately, when update_from_dir exits and is run again, the second time it appears to write no log entries and use no CPU.

op@h23:~$ date
Sun Feb 15 11:35:12 AM UTC 2026

op@h23:~$ ps -ef | grep update_from | grep -v grep
op        101948  101203  0 11:09 pts/4    00:00:00 ./update_from_dir --osc-dir=/tmp/osm-3s_update_zYGuCC/process_6985769 --version=2026-02-13T14\:27\:30Z --flush-size=0

op@h23:~$ ls -alt log/apply_osc_to_db.out
-rw-rw-r-- 1 op op 72695315 Feb 15 11:08 log/apply_osc_to_db.out

The last couple of lines of log/apply_osc_to_db.out are:

/opt/op/bin/apply_osc_to_db.sh: line 258: 101756 Aborted                 ./update_from_dir --osc-dir="$OSC_DIR" --version="$DATA_VERSION" $META --flush-size=0
2026-02-15 11:08:38: ERROR: update_from_dir failed (exit code: 134), retry 1/5

The process 101756 which aborted was replaced by process 101948 (see above), but that does not appear to be doing anything.

I am currently using minutely diffs from https://planet.osm.org/replication/minute/ . I'm aware of #565 ; I could use Geofabrik's daily diffs, but I'd prefer to have minutely updates. I'm aware what that does to database size and would eventually want to put in place something like trim_osc.py (previously mentioned at #774 (comment) ).

I'd expect, even if it encounters a node that it has not previously seen, that update_from_dir wouldn't just stall in this way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions