Faster Playwright Builds / Bad man-db
This one weird trick will speed up your build jobs by minutes!
TL;DR
If you're using playwright in CI on Ubuntu, add the following to the start of your build job:
sudo bash -ec 'echo "set man-db/auto-update false" | debconf-communicate; dpkg-reconfigure man-db'
Wait, what?
Playwright has to install a bunch of extra dependencies.
In Ubuntu, installing these dependencies triggers an update to the manpages of (presumably) at least one of the dependencies.
What is a man?
These manpages are what you see if you run the man command.
There is a known issue in the current version of mandb bundled in GitHub Actions' ubuntu-latest image:
- Ubuntu: man-db trigger for apt is excessively slow
- GitHub Actions runner: man-db trigger severely stalls package installation on ubuntu-24.04 runners
- GitHub Actions runner-images: Disable man-db dpkg trigger
Why do I care about manpages on my CI server?
You almost certainly don't. When did you last SSH in to your CI server, and then look up a command with man?
And even if you do, I suspect you could live without it.
How do I know if my builds are affected?
Check your build logs for the string Processing triggers for man-db
E.g. https://github.com/pouchdb/pouchdb/actions/runs/18662078104/job/53204798400:
2025-10-20T19:09:21.9452016Z Processing triggers for man-db (2.12.0-4build2) ...
2025-10-20T19:09:39.5871856Z Processing triggers for libglib2.0-0t64:amd64 (2.80.0-6ubuntu3.4) ...
In this example, Processing triggers for man-db "only" took ~18 seconds.
On a bad day, this can take many minutes, e.g. https://github.com/getodk/central-backend/actions/runs/18714925948/job/53371880030:
2025-10-22T12:15:48.7316030Z Processing triggers for man-db (2.12.0-4build2) ...
2025-10-22T12:23:36.4221211Z Processing triggers for libglib2.0-0t64:amd64 (2.80.0-6ubuntu3.4) ...
What's it even caused by?
I suspect it's one of these packages which playwright install-deps or install --with-deps pulls in:
fonts-freefont-ttf fonts-ipafont-gothic fonts-tlwg-loma-otf fonts-unifont
fonts-wqy-zenhei glib-networking glib-networking-common
glib-networking-services gsettings-desktop-schemas gstreamer1.0-libav
gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good
libaa1 libabsl20220623t64 libass9 libasyncns0 libavc1394-0 libavcodec60
libavfilter9 libavformat60 libavif16 libavtp0 libavutil58 libblas3
libbluray2 libbs2b0 libcaca0 libcairo-script-interpreter2 libcdparanoia0
libchromaprint1 libcjson1 libcodec2-1.2 libdav1d7 libdc1394-25 libdca0
libdecor-0-0 libdirectfb-1.7-7t64 libdv4t64 libdvdnav4 libdvdread8t64
libegl-mesa0 libegl1 libevent-2.1-7t64 libfaad2 libflac12t64 libflite1
libfluidsynth3 libfreeaptx0 libgav1-1 libgles2 libgme0 libgraphene-1.0-0
libgsm1 libgssdp-1.6-0 libgstreamer-gl1.0-0 libgstreamer-plugins-bad1.0-0
libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgtk-4-1
libgtk-4-common libgupnp-1.6-0 libgupnp-igd-1.6-0 libharfbuzz-icu0
libhwy1t64 libhyphen0 libiec61883-0 libimath-3-1-29t64 libinstpatch-1.0-2
libjack-jackd2-0 libjxl0.7 liblapack3 liblc3-1 libldacbt-enc2 liblilv-0-0
liblrdf0 libltc11 libmanette-0.2-0 libmbedcrypto7t64 libmfx1
libmjpegutils-2.1-0t64 libmodplug1 libmp3lame0 libmpcdec6
libmpeg2encpp-2.1-0t64 libmpg123-0t64 libmplex2-2.1-0t64 libmysofa1
libneon27t64 libnice10 libopenal-data libopenal1 libopenexr-3-1-30
libopenh264-7 libopenmpt0t64 libopenni2-0 libopus0 liborc-0.4-0t64
libpipewire-0.3-0t64 libplacebo338 libpocketsphinx3 libpostproc57
libproxy1v5 libpulse0 libqrencode4 libraptor2-0 librav1e0 libraw1394-11
librist4 librsvg2-2 librubberband2 libsamplerate0 libsbc1 libsdl2-2.0-0
libsecret-1-0 libsecret-common libserd-0-0 libshine3 libshout3 libsndfile1
libsndio7.0 libsord-0-0 libsoundtouch1 libsoup-3.0-0 libsoup-3.0-common
libsoxr0 libspa-0.2-modules libspandsp2t64 libspeex1 libsphinxbase3t64
libsratom-0-0 libsrt1.5-gnutls libsrtp2-1 libssh-gcrypt-4 libsvtav1enc1d1
libswresample4 libswscale7 libtag1v5 libtag1v5-vanilla libtheora0
libtwolame0 libudfread0 libunibreak5 libv4l-0t64 libv4lconvert0t64
libva-drm2 libva-x11-2 libva2 libvdpau1 libvidstab1.1 libvisual-0.4-0
libvo-aacenc0 libvo-amrwbenc0 libvorbisenc2 libvpl2 libvpx9 libwavpack1
libwebrtc-audio-processing1 libwildmidi2 libwoff1 libx264-164 libx265-199
libxcb-xkb1 libxkbcommon-x11-0 libxvidcore4 libyuv0 libzbar0t64 libzimg2
libzix-0-0 libzvbi-common libzvbi0t64 libzxing3 ocl-icd-libopencl1
session-migration timgm6mb-soundfont xfonts-cyrillic xfonts-encodings
xfonts-scalable xfonts-utils
What's the real-world impact?
Your builds
Sometimes Processing triggers for man-db can take ~1 second.
Sometimes it takes more than 10 minutes.
This can cause slow build jobs, and may even be the direct cause of build timeouts.
These timeouts can be insidious, as the timeout itself may trigger later in the build job, making it hard to pin the cause back to man-db.
Worldwide Impact
To get an idea of the worldwide impact of this bug, some questions:
- how many times is playwright installed every week?
- how many of these installs are likely to be in clean environments like CI workers?
- how long does an average
man-dbupdate take?
[playwright-test is downloaded ~24 million times per week](TODO npm link). Let's assume 99% of these installs are in fresh environments - this seems conservative to me, but perhaps some developers are triggering less than 99 CI builds before moving on to a new job or a new playwright version.
From a quick check of PouchDB's GitHub Actions logs, man-db updates take ~1 minute on average.
24,000,000 * 0.99 * 1 = 23760000 minutes
So every week, the worlds' computers spend approximately 45 years updating man-db pages due to installation of playwright dependencies.
45 years, every week!
For man pages which will never be read.
So what can we do?
As discussed at https://stackoverflow.com/questions/76607092/google-compute-engine-processing-triggers-for-man-db-2-9-4-2-it-takes-a, you can either:
- remove support for manpages from your build image, or
- disable
man-dbupdates in your build image
1. Remove support for manpages
This is the nuclear option, and perhaps risky:
sudo apt-get remove -y --purge man-db
2. Disable man-db updates
sudo bash -ec 'echo "set man-db/auto-update false" | debconf-communicate; dpkg-reconfigure man-db'
Conclusion
There's probably loads of other stuff that ubuntu-latest or similar base images are providing in your CI environment which have potential for impact like this. Stay vigilant, and trust no-one.