PHP

🐘

Not just a mammal, a runtime.

The PHP component sets the memory and the number of PHP processes of a fortrabbit environment, and with them how many requests it answers at once. Its plan also sets the MySQL connections.

Booking

Choose the PHP plan when creating an app or an environment, and change it later on the components page of the environment.

Configuration

The PHP settings of each environment set the version, extensions and ini values. The metrics and logs show how PHP performs.

Scaling

PHP plans differ in memory and in the number of PHP processes. Start small and scale when the metrics ask for it: PHP memory near the plan line, OOM kills, or 503 errors when all processes are busy. See PHP processes.

Autoscaling

PHP does not autoscale. A traffic peak or a slow script would otherwise set the bill, so the PHP plan stays where it is booked.

Starting points

XS and SM cover most websites. Starting points from experience:

SoftwarePHP memory
Craft CMS, October CMS512 MiB
WordPress, Kirby, Grav, Statamic256 MiB
Laravel, Filament256 MiB

The real need depends on visitors, plugins, configuration and custom code, see the performance section.

MySQL connections for PHP

The PHP plan sets the number of MySQL connections: one per PHP process, plus some for jobs and database clients.

PHP planPHP processesMySQL connections
XS28
SM28
MD412
LG616
XL820
2XL1228

Written by a human. Review, grammar checks and typo fixes by AI.

AI use & editorial processEdit on GitHub ↗