bk99.de entertain the web since 1997

PHP-FPM with separate pools for web hosting customers

Summary

Manuel Schmitt describes the gradual switch of an entire hosting platform to separate PHP-FPM pools for each web hosting package. The switch was rolled out gradually over about a week and a half. Each web hosting package received its own FPM pool.

Ideas

  • Separate FPM pools run PHP with the user, group and umask of the respective package.
  • According to the operator, the migration improves the speed of WordPress and Nextcloud.
  • A custom Apache module ignores old php_flag and php_value lines instead of causing error 500.
  • Separate PHP error logs make diagnosis easier for customers.

Insights

  • Compatibility layers can decouple large platform migrations without permanently legitimising legacy baggage.
  • Tenant separation becomes stronger when runtime processes use the same ownership boundaries as customer data.

Facts

  • PHP errors are then logged separately in /logs/php.err.log.

Recommendations

  • Measure latency, memory usage and error rate before and after the switch.
  • Remove outdated php_flag rules after a documented transition period.

References

Read the original article on Hostblogger

Search the Web Archive