I'm blogging about Emacs, Drupal, php and exciting subjects

· Lars Nielsen

MySQL LEAST() Compared My Numbers as Strings: PDO Parameters and a Backoff Cap That Didn't Cap

My search engine's crawler backed off from hosts that kept failing: each consecutive failure doubled the wait before the next attempt, up to a cap of one day. During one long working session in July, one test of that logic failed in every run, and it kept being written off as a "pre-existing, unrelated" failure.

Read article MySQL LEAST() Compared My Numbers as Strings: PDO Parameters and a Backoff Cap That Didn't Cap
· Lars Nielsen

GitHub Actions Can't SSH to My Server: Retrying on Exit 255 and a Server-Side Deploy Fallback

CaRMen's deploys run from GitHub Actions: once the tests pass on the main branch, a job builds and publishes the Docker images, and a deploy job connects to the server over SSH and tells it to switch to the new version. Within a day of setting that up, the deploy job started failing some of the time with SSH errors, while the images it was meant to deploy had been published just fine.

Read article GitHub Actions Can't SSH to My Server: Retrying on Exit 255 and a Server-Side Deploy Fallback
· Lars Nielsen

MySQL NOW() Was Two Hours Ahead of My UTC Data: The Container's Time Zone

In early July the admin statistics page of my search engine started reporting zero: zero pages crawled in the last hour, zero in the last 24 hours, on a pipeline that was visibly busy. At the same time, re-crawls were being scheduled two hours early. Both had the same cause, and none of the data was wrong. The database and the application disagreed about what time it was.

Read article MySQL NOW() Was Two Hours Ahead of My UTC Data: The Container's Time Zone
· Lars Nielsen

Docker .env Permission Denied: Mode 0600 Broke New PHP Processes and Left Old Ones Running Open

Tightening a file's permissions is supposed to be the safe direction. In July, on my search engine's frontend server, setting the application's .env file to mode 0600 instead did two things at once: it broke every newly started PHP process, and it left the admin area answering without a password for a few minutes. A smoke test after the deploy caught it.

Read article Docker .env Permission Denied: Mode 0600 Broke New PHP Processes and Left Old Ones Running Open
Subscribe to Linkhub