been running puppeteer in docker for automated screenshots and the font rendering drives me nuts. same page looks completely different between my mac and the container because different font stacks.

installed google fonts in the dockerfile which helped but theres still subtle differences in kerning and hinting. antialiasing is different too depending on whether the container has fontconfig set up properly.

the really annoying part is screenshots of text-heavy pages where the line breaks end up in different places because of font metrics differences. a heading that fits on one line locally wraps to two lines in the container.

tried using web fonts exclusively (loading them via @font-face) which makes it more consistent but some sites use system fonts and you cant control that.

anyone found a solid approach for getting consistent font rendering across environments? or is this just one of those "works on my machine" problems that never fully goes away

 

So I’ve been thinking about this for a while. I run a small screenshot API - nothing huge, mix of free and paid users. The thing is, most people who actually use it don’t even log into the dashboard. They just wrote their integration code once and forgot about us lol

But here’s what bugs me - there’s a decent chunk of users who signed up, got their API key, and then… nothing. Zero requests. Ever.

Is it even worth sending them emails? Like “hey you signed up 3 months ago, here’s how to get started” kind of thing. Part of me thinks if someone couldn’t be bothered to make a single API call, no email is gonna change that. They probably just signed up while evaluating options and went with something else.

On the other hand maybe they just got distracted or the docs weren’t clear enough at the time?

For those of you running API products or dev tools - do you bother with re-engagement emails for users who never made a single request? Or is it just noise at that point

 

Curious what everyone's approach is for handling cron jobs that depend on external APIs.

Had a data sync job that pulled from a vendor API every hour. Worked great for months until the vendor started rate-limiting us during peak hours. The job would fail, retry on the next cron tick, hit the rate limit again, and basically spin for 3-4 hours until traffic died down.

What I ended up doing was adding exponential backoff inside the job itself — first retry after 5 min, then 15, then 60. But it felt wrong because now the job's execution time is unpredictable and can overlap with the next scheduled run.

The other approach I considered was just letting it fail and having a separate "catch-up" job that runs less frequently and handles any gaps. Cleaner separation but more moving parts.

For those of you running scheduled jobs that depend on third-party services: do you build the retry logic into the job, handle it at the scheduler level, or just accept that some runs will fail and deal with it downstream?

Also wondering if anyone's hit issues with jobs that silently succeed but return partial data — like the API responds 200 but only gives you half the records because of an undocumented pagination change. That one took me a while to catch.

 

Started with Laravel 4. Back then it was a lightweight framework — routes, Eloquent, Blade, done. Now the box ships with queues, broadcasting, events, policies, gates, notifications, API resources, Sanctum, Pennant, Folio, Volt, Prompts, Reverb, Pulse... The list grows every year.

For someone picking it up today, this isn't a framework anymore — it's an entire ecosystem where figuring out where to start is a project in itself. The docs are great, genuinely. But there's so much of them now that just reading through everything takes a week.

On the flip side, when you need to ship a real product in a month — everything's right there. No agonizing over which of 15 queue packages to use or hunting for a decent WebSocket server. Install Reverb, move on.

Feels like Laravel is heading toward becoming Rails for PHP — a platform that covers absolutely everything. The question is whether they can keep the onboarding simple. So far they're pulling it off, but every release raises the bar just a little.

 

Been running a screenshot pipeline for visual regression testing and hit something annoying — the same page renders slightly differently depending on the host OS. CentOS 7 vs Ubuntu 22.04 vs Alpine in Docker all produce different pixel outputs for identical URLs with identical Chrome versions.

The culprit is mostly font rendering. FreeType versions differ, fontconfig has different defaults, and some distros ship with subpixel antialiasing enabled while others don't. The result is text that's a pixel or two off, which is enough to trigger visual diff alerts on every single run.

Things I've tried:

  • Pinning the Chrome version — helps with browser-level rendering but doesn't fix OS-level font differences
  • Using --font-render-hinting=none — reduces cross-platform variance significantly but text looks slightly worse
  • Installing identical font packages everywhere — tedious but necessary. fonts-liberation + fonts-noto covers most cases
  • Running everything in the same Docker image — the nuclear option, but it works. If every environment uses the same base image, font rendering is identical

The Docker approach is what I settled on. Built a custom image with Chrome, all the fonts I need, and locked the FreeType version. Screenshots are now consistent across dev machines, CI, and production.

Curious if anyone else has run into this and found a cleaner solution. The font rendering inconsistency feels like something that should have a standard fix by now but apparently doesn't.

Side benefit of fixing this: once your baselines are stable, visual regression testing actually becomes useful instead of a noise generator.

 

Been running a handful of scheduled tasks on two VPS instances for about a year now — nightly DB dumps, cache warmers, a couple of data sync scripts. Had everything piped to log files and thought I was covered.

Then last month one of the sync scripts started hanging mid-execution. It never crashed, never threw an error, just... sat there. The log showed the start timestamp but no finish line. Took me four days to notice because I wasn't checking logs daily (who does).

After that I looked into what people use to catch this kind of thing.

What I tried:

Healthchecks.io — solid, does the job. You curl a URL at the end of your cron and if the ping doesn't arrive within the expected window, you get an alert. Simple concept.

I also tested WatchCron which works on the same principle but felt a bit snappier to set up for multiple jobs. Has a dashboard that shows timing patterns across runs, which helped me spot that one of my backup jobs was gradually taking longer each week — would've missed that with just pass/fail alerts.

The pattern that works for me now:

#!/bin/bash
# at the end of each cron script
curl -fsS -m 10 --retry 3 $MONITOR_URL > /dev/null

If the script hangs or exits early, the ping never fires, and I get a Slack notification within minutes.

One thing I changed — I stopped redirecting cron output to /dev/null. Feels obvious in hindsight but I see it everywhere in tutorials. If your task does fail, you want that output in the mail spool or a log, not gone.

What's your setup for catching silent failures? Curious if anyone's doing something beyond the "ping on success" model — like tracking execution duration or exit codes.

submitted 2 months ago* (last edited 2 months ago) by to c/programming@programming.dev
 

Deployed a backup script on a new server, tested it manually — worked fine. Set up crontab, came back next morning, no backup. Turns out /usr/local/bin wasn't in cron's PATH so pg_dump just silently didn't exist.

Switched to absolute path and it worked immediately. Fifteen minutes of debugging for a one-character fix. I keep making this mistake every time I set up a new box. At this point I should just have a checklist taped to my monitor.

 

Ran into a situation last week that got me thinking about how most teams handle visual changes in production.

We pushed a CSS update that was supposed to fix button alignment on one page. Looked fine in staging. Looked fine in the PR preview. Got merged, deployed, and broke the card layout on three other pages because of a shared utility class.

Caught it about four hours later when a customer mentioned it in a support ticket. Not a great look.

What we tried

After that incident we talked about adding visual regression testing to CI. Looked at a few options:

  • Percy — solid, but the pricing gets steep once you have more than a handful of pages and multiple PRs a day

  • Playwright screenshots in CI — free, but you need to maintain baseline images and the diffs are noisy. Every font rendering difference across runners triggers a false positive

  • Manual spot checks after deploy — what we were doing. Obviously not sufficient

We ended up going with Playwright screenshot comparisons but with a pretty generous diff threshold (0.3%) to cut down on false positives. It catches big layout shifts but ignores sub-pixel rendering differences. Good enough for now, but not ideal.

The production monitoring gap

CI-based visual testing only covers what happens before deploy. It doesn't catch things that break after — CDN caching serving old assets, third-party scripts injecting unexpected elements, A/B test variants rendering wrong.

Some teams run synthetic monitoring that takes periodic screenshots of production pages and compares them. That covers the post-deploy gap but it's a separate system to set up and maintain.

Curious what others do

How are you handling visual verification in production? Specifically:

  • Do you run any visual checks post-deploy, or only in CI?

  • If you use screenshot comparison, how do you deal with dynamic content (dates, user-specific data, ads)?

  • Anyone running continuous visual monitoring on production pages on a schedule?

Feels like there should be a simpler answer than "maintain 200 baseline images and pray the CI runner has the same font rendering as last time."

 

Been dealing with this more often lately. Tests pass on my machine, I push, and CI blows up. Usually it's one of these:

  • Different Node/Python/whatever version
  • Missing env vars that exist in my .env but not in CI secrets
  • File system case sensitivity (macOS vs Linux)
  • Some flaky test that depends on timing

My current debugging flow is pretty basic: check the logs, compare versions, run the exact same Docker image locally if I can. But it still eats 20-30 minutes each time before I figure out the actual problem.

Anyone have a more systematic approach? Like a quick checklist you run through before you even look at the logs?

Also curious — do you replicate your CI environment locally with something like act (for GitHub Actions) or just trust the remote runner?

 

Had a backup script running via cron for months. Worked fine until it didn't — turns out the disk filled up three weeks ago and the job started failing silently. Nobody noticed until we actually needed a restore.

The obvious answer is "check your logs" but let's be honest, nobody's reading cron logs daily for 15 different scheduled tasks across 4 servers.

What's your setup for making sure crons are actually completing? Do you just grep logs periodically, or do you have something more structured? Curious how others handle this without turning it into a whole project.

 

Working on a project where I need to grab screenshots of pages on a schedule — mostly for QA and keeping a visual history of what changed and when.

Right now I'm running Puppeteer in a cron job on a cheap VPS. It works, but honestly it's a pain to maintain. Chromium eats RAM like crazy, sometimes it hangs and the whole thing needs a restart, and the screenshots come out wrong on pages that load content dynamically.

A few things I've been struggling with:

  • Pages with lazy-loaded images — half the time the screenshot fires before everything renders
  • Cookie consent banners blocking the actual content
  • Memory usage goes through the roof when I try to do more than ~50 pages in a batch

I've looked into Playwright as a replacement but from what I can tell the resource usage is about the same. Also tried running headless Chrome in Docker which at least makes cleanup easier, but didn't solve the core problems.

Curious what others are using. Are screenshot APIs worth it for this kind of thing, or is self-hosting still the way to go? Anyone running something similar at scale?

view more: next ›