Skip to content

v0.35.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 23:44
· 1 commit to main since this release

Features

Idle sleeping — quiet sites give their memory back. Every site keeps a php-fpm pool, and a pool nobody is using still holds about 11 MB. After twelve hours without a request the daemon now parks it and marks the site sleeping; the next request starts it again in around a third of a second, once.

  • agent-local idle shows the window and which site parks next. agent-local idle 6 retimes it, agent-local idle off never parks anything.
  • A reboot only restores pools used inside the window. Everything else comes back sleeping and wakes on first request, which is where most of the memory comes back.
  • sleeping is a new state, and it is not stopped: stopped means a person stopped it. list, the dashboard and the API say which — both are woken by the next request.
  • The site record carries last_active and idle_sleeps_in, so an agent can see when a site will park without guessing.
  • Parking only runs on the router front. Apache forwards straight to a pool's socket and cannot start one, so switching to that front wakes everything parked first.

Fixes and changes

A pool that disappears mid-request no longer turns into a 502. The router checked the pool's socket, then dialed it; if the pool died in between — or a site parked — the request failed. It now starts the pool and serves the request instead.

Install

brew install jefrontv/tap/agent-local
# or, no Homebrew:
curl -fsSL https://raw.githubusercontent.com/jefrontv/agent-local/main/install.sh | bash

Already installed? agent-local update

First run

agent-local doctor --fix   # installs whatever is missing (PHP, MariaDB…)
agent-local sudo           # one-time: no more password prompts
agent-local create mysite