# /usr/lib/systemd/system/apt-daily-upgrade.timer # # VENDOR FILE, EDITED IN PLACE. Install with `sudo cp` so `diff` stays meaningful, and see the # dpkg-overwrite warning in apt-daily.timer beside this one -- it applies here too, and here it # matters more: this is the unit that restarts services. # # THIS IS THE ONE THAT KILLS WORK. It runs unattended-upgrade, and needrestart then restarts # every service linked against anything upgraded. On 2026-08-26 that was libssl3t64 + openssl at # 06:04:42, and at 06:04:46 systemd stopped apache2, php8.3-fpm, mysql, redis-server, memcached, # sshd and re-execed itself. MySQL was gone for 12 seconds. DW ingest run 1459 died mid-write # with no PHP shutdown handler, leaving a stuck 'running' row, an orphaned temp parquet and a # lock that blocked a second report for two hours. Run 1403 went the same way on 2026-08-20. # # Vendor default was `OnCalendar=*-*-* 6:00` with `RandomizedDelaySec=60m`: an unpredictable # minute between 06:00 and 07:00 (06:04:36 on 08-26, 06:22:00 on 08-25, 06:20:42 on 08-24), # straight through report 72's 06:00 ingest. A window that moves an hour cannot be scheduled # around, so 00:00-01:00 UTC is now reserved for maintenance and no report may start in it -- # the dashboard hour pickers show 00:00 as "Server maintenance", disabled. # # 00:45 is chosen inside that window: after logrotate and dpkg-db-backup (00:00) and # sysstat-summary (00:07), and 22 minutes clear of report 149, which used to run 00:00-00:23 and # is being moved out. Install plus restart takes ~40s (06:04:36 -> 06:05:19 on 08-26), so the # box is quiet again well before 01:00. # # Persistent=false, changed from the vendor's true: `true` means a run missed because the box # was down fires at the next boot instead -- which would put the restart at an arbitrary hour # and defeat the whole point. Skipping a day is harmless; the next night picks it up. [Unit] Description=Daily apt upgrade and clean activities After=apt-daily.timer [Timer] OnCalendar=*-*-* 00:45:00 RandomizedDelaySec=0 Persistent=false [Install] WantedBy=timers.target