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

· Lars Nielsen

LanguageTool Server Failed With "Address Already in Use", and My Script Carried On Anyway

The script that drafts and schedules articles for this site starts a self-hosted LanguageTool server for each run, so every draft gets a grammar check before it's published. On 15 October, on the LFS laptop it now runs on, I found that LanguageTool hadn't started at all, and nothing in the script's output said so.

Read article LanguageTool Server Failed With "Address Already in Use", and My Script Carried On Anyway
· Lars Nielsen

API Platform 4 Dropped the hydra: Prefix, and Every List in My CRM Went Empty

I run a small CRM for myself called CaRMen — a Symfony 7 API Platform backend with a React frontend. In August I had to bump api-platform/core from ^3.3 to ^4.0, not because I wanted the new major version, but because composer's own security-advisory audit flagged every 3.3.x and 3.4.x release in a row. There was no patched 3.x left to stay on.

Read article API Platform 4 Dropped the hydra: Prefix, and Every List in My CRM Went Empty
· Lars Nielsen

Drupal Tried to Email Me 1,189 Times. There Was No Sendmail to Send Them.

This site runs Drupal's cron every 15 minutes from a crontab on the server, with the output appended to a log file in my home directory. For about twelve days in September, almost every one of those runs tried to send me an email, failed, and wrote two lines about it to that log. Nobody read the log. The emails were security update notifications.

Read article Drupal Tried to Email Me 1,189 Times. There Was No Sendmail to Send Them.
· Lars Nielsen

A Reindex Done as Pure Insurance Paid for Itself Anyway

A reindex that was scheduled purely as insurance, against a problem that almost certainly wasn't going to happen this time, finished with a real, measurable bonus nobody had gone looking for: nearly a third of the database's total index storage disappeared, cleanly, as a side effect of doing something that was never actually about storage in the first place.

Read article A Reindex Done as Pure Insurance Paid for Itself Anyway
· Lars Nielsen

Symfony Login Throttling Behind a Reverse Proxy: Without trusted_proxies, Everyone Shares One IP

CaRMen, the CRM I built for myself, now runs as two public sites: the real instance and a demo. Public means bots find the login endpoint within hours, so in October I added rate limiting to logins and to password-reset emails. The limits themselves took a few lines of Symfony configuration.

Read article Symfony Login Throttling Behind a Reverse Proxy: Without trusted_proxies, Everyone Shares One IP
· Lars Nielsen

A Rollback Plan That Deliberately Isn't One

The version of a database upgrade that fits on a disk with limited free space and the version of a database upgrade that keeps a true instant rollback available turned out to be two different operations. Choosing the one that actually fit meant giving up the other, deliberately, with the tradeoff written down plainly rather than discovered the hard way if it were ever needed.

Read article A Rollback Plan That Deliberately Isn't One
Subscribe to Linkhub