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

· 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
· Lars Nielsen

Postgres Kept Getting OOM-Killed. shared_buffers Was Set to 70% of RAM.

For about a day in August, the Postgres server behind my search engine kept dying. Not slowing down, not timing out: the Linux OOM killer was terminating it, roughly every 20 to 90 minutes at the worst point, and each kill meant a crash-recovery cycle of about 90 seconds while Postgres replayed its write-ahead log.

Read article Postgres Kept Getting OOM-Killed. shared_buffers Was Set to 70% of RAM.
Subscribe to Linkhub