linux

  • 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 —…

  • Compose file version 3, and what swarm changed

    v3 exists to be deployable to a scheduler, and that removes things a single-host file relied on. What went, why it had to, and what replaces it.

  • Centralised logging that answers a question

    Four servers, eleven log files, and an incident reconstructed from three of them. Shipping first and parsing second, structured events, and the correlation id that makes it useful.