Fixed Platform

Fixed pages failing with "Too many connections" when the site was busy

Each scheduled job's wrapper held a database connection idle while its job ran, doubling the connections the schedule used every minute. It now connects only to record a job's start and finish.

Every minute about two dozen scheduled jobs start, many running for up to 50 seconds. Each ran inside a wrapper (bin/run-schedule.php --job) that kept its own MySQL connection open the whole time, beside the job's own connection. With Apache allowed 150 workers and MySQL 151 connections, a busy moment went over the limit on 6 November 2026 and pages failed with "Too many connections".

The wrapper now lets its connection go before the job starts and opens a short one to record the finish (ScheduledJobRun, Database::connect(), ZeroORM::releaseDatabase()). It logs schedule.connection_still_held if anything kept the first connection open.