Skip to content

fix: retry pecl installs with backoff - #23

Merged
imorland merged 1 commit into
masterfrom
im/pecl-install-retries
Oct 21, 2026
Merged

imorland merged 1 commit into
masterfrom
im/pecl-install-retries

Conversation

@imorland

Copy link
Copy Markdown
Owner

pecl.php.net returns 500/504s (or "no releases available") under load, which has failed whole build matrices on the first error twice today: #20's post-merge builds and the first attempt of #22's.

  • bin/pecl-install wraps pecl install with up to 6 attempts, backing off 10s → 160s (about 5 minutes in all), and clears pear's download cache between attempts. PECL_INSTALL_ATTEMPTS / PECL_INSTALL_DELAY tune it.
  • Every pecl install in the 8.2–8.5 prefork and FPM images, dev variants included, now uses it. Dev images copy the script themselves rather than rely on their base image having it.
  • 7.4/8.0/8.1 are left alone; no workflow builds them.

Checked in php:8.5-cli: a bogus package retries and fails cleanly after the last attempt, and excimer installs normally. All 18 Dockerfiles pass docker buildx build --check.

Merging rebuilds both the prefork and FPM images (it touches 8/** and fpm/**).

pecl.php.net answers package downloads with 500/504s, or claims a package
has no releases, whenever it is under load. With a PHP security release out
and everyone rebuilding at once, that failed whole build matrices on the
first error: #20's post-merge builds, and the first attempt of #22's.

bin/pecl-install runs `pecl install` up to six times, waiting 10s and
doubling each time (about five minutes in all), and clears pear's download
cache between attempts. Every `pecl install` in the 8.2-8.5 and FPM images,
dev variants included, now goes through it. The dev images copy the script
themselves rather than rely on the base image already carrying it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant