linux

  • trap EXIT is how a script cleans up after itself

    A script that creates a temporary directory, a lock file or a maintenance flag has to remove it on every path out — including the ones it did…

  • Wildcard certificates, and the DNS challenge

    ACME v2 landed in March and wildcards need a different proof. The certificate is the easy part; the API token that can rewrite your zone is not.

  • A swap file on a small VPS, and the OOM killer it prevents

    A one-gigabyte VPS running MySQL, PHP and nginx has no headroom, and the kernel resolves that by killing the largest process — which is MySQL, mid-write. Swappiness at…

  • A logrotate config that does not lose the last hour

    Rotating a log by renaming the file leaves the writing process holding a handle to the renamed inode, so it keeps writing to a file nobody is looking…

  • Running as a non-root user in the image

    A container defaults to root, and root in the container is root on the host for anything mounted — so a build script that deletes a directory can…

  • The build cache misses on a file mode change

    A build that rebuilds from scratch on CI while being fully cached locally is usually not a Docker problem — it is that the checkout produced different file…

  • docker system prune, and the disk it gives back

    A development machine that builds images daily accumulates dangling layers, stopped containers and orphaned volumes, and none of it is visible until the disk fills. -a –volumes is…

  • journald rate limiting drops your logs silently

    systemd-journald discards messages from a service exceeding its burst limit and notes the fact in a single line that is easy to miss — so a debugging session…

  • Alerting that people do not learn to ignore

    340 alerts in a month, four of which mattered. An alert channel nobody reads is the same as no alerting, and the cause is alerting on causes.

  • Logging drivers, and why json-file fills the disk

    The default driver writes every line to a JSON file with no rotation, so a chatty container quietly consumes the host disk and nothing points at it —…