PHPackages                             andreybolonin/php-pm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. andreybolonin/php-pm

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

andreybolonin/php-pm
====================

PHP-PM is a process manager, supercharger and load balancer for PHP applications.

1.0.1(8y ago)045MITPHPPHP &gt;=5.6.0

Since Jan 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/andreybolonin/php-pm)[ Packagist](https://packagist.org/packages/andreybolonin/php-pm)[ RSS](/packages/andreybolonin-php-pm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (15)Versions (7)Used By (0)

PPM - PHP Process Manager
=========================

[](#ppm---php-process-manager)

[![](https://avatars3.githubusercontent.com/u/11821812?v=3&s=200)](https://avatars3.githubusercontent.com/u/11821812?v=3&s=200)

PHP-PM is a process manager, supercharger and load balancer for PHP applications.

[![Build Status](https://camo.githubusercontent.com/c9a08936c802cd4aaa71dabf85d65e32e6a5b389fa5b0674752bc1b468e32d4e/68747470733a2f2f7472617669732d63692e6f72672f7068702d706d2f7068702d706d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/php-pm/php-pm)[![Gitter](https://camo.githubusercontent.com/27e5750d7e9d727c83daab840af8b9831df6ea10919ff93c172063ecbd940ffa/68747470733a2f2f6261646765732e6769747465722e696d2f7068702d706d2f7068702d706d2e737667)](https://gitter.im/php-pm/php-pm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

It's based on ReactPHP and works best with applications that use request-response frameworks like Symfony's HTTPKernel. The approach of this is to kill the expensive bootstrap of PHP (declaring symbols, loading/parsing files) and the bootstrap of feature-rich frameworks. See Performance section for a quick hint. PHP-PM basically spawns several PHP instances as worker bootstraping your application (eg. the whole Symfony Kernel) and hold it in the memory to be prepared for every incoming request: This is why PHP-PM makes your application so fast.

More information can be found in the article: [Bring High Performance Into Your PHP App (with ReactPHP)](http://marcjschmidt.de/blog/2014/02/08/php-high-performance.html)

### Features

[](#features)

- Performance boost up to 15x (compared to PHP-FPM, Symfony applications).
- Integrated load balancer.
- Hot-Code reload (when PHP files change).
- Static file serving for easy development procedures.
- Support for HttpKernel (Symfony/Laravel), Drupal (experimental), Zend (experimental).

### Badge all the things

[](#badge-all-the-things)

Does your app/library support PPM? Show it!

[![PPM Compatible](https://raw.githubusercontent.com/php-pm/ppm-badge/master/ppm-badge.png)](https://github.com/php-pm/php-pm)

```
[![PPM Compatible](https://raw.githubusercontent.com/php-pm/ppm-badge/master/ppm-badge.png)](https://github.com/php-pm/php-pm)

```

#### Use

[](#use)

```
cd into/your-application

# run Symfony
docker run -v `pwd`:/var/www -p 8080:80 phppm/nginx --bootstrap=symfony --static-directory=web/

# run Laravel
docker run -v `pwd`:/var/www -p 8080:80 phppm/nginx --bootstrap=laravel --static-directory=public/
```

Docker is easier to setup and maintain. If your applications requires additional environment tools or libraries, you can build your own image based on ours. See [github.com/php-pm/php-pm-docker](https://github.com/php-pm/php-pm-docker) for more information.

When `debug` is enabled, PHP-PM detects file changes and restarts its worker automatically.

#### Use without Docker

[](#use-without-docker)

Follow the wiki article [Use without Docker](https://github.com/php-pm/php-pm/wiki/Use-without-Docker).

#### Performance

[](#performance)

To get the maximum performance you should usually use `--app-env=prod` with disabled debug `--debug=0`. Also make sure xdebug is disabled. Try with different amount of workers. Usually a 10% over your cpu core count is good. Example: If you have 8 real cores (excl. hyper-threading) use `--workers=9`.

To get even more performance (for static file serving or for rather fast applications) try a different event loop (see ).

#### Debugging

[](#debugging)

If you get strange issues in your application and you have no idea where they are coming from try using only one worker `--workers=1` and enable `-v` or `-vv`.

When debugging you should use xdebug as you're used to. If you set a break point and hold the application, then only one worker is stopped until you release the break point. All other workers are fully functional.

**Note for XDebug and PHPStorm**: Since php-pm uses at least two processes, there are two xdebug instances as well. PHPStorm is per default configured to only accept one connection at a time. You need to increase that. You won't get xdebug working with your application if you don't increase that count.

[![Xdebug and PHPStorm](https://raw.githubusercontent.com/php-pm/assets/master/xdebug-phpstorm.png)](https://raw.githubusercontent.com/php-pm/assets/master/xdebug-phpstorm.png)

In all workers the STDOUT is redirected to the connected client. So take care, `var_dump`, `echo` are not displayed on the console. STDERR is not redirected to the client, but to the console. So, for very simple debugging you could use `error_log('hi')` and you'll see it on the console. Per default exceptions and errors are only displayed on the console, prettified with Symfony/Debug component.

### Adapter

[](#adapter)

**HttpKernel for Symfony/Laravel** -

**Zend** -

### Command

[](#command)

[![ppm-help](https://raw.githubusercontent.com/php-pm/assets/master/help-screenshot.png)](https://raw.githubusercontent.com/php-pm/assets/master/help-screenshot.png)

[![ppm-start](https://raw.githubusercontent.com/php-pm/assets/master/start-command.png)](https://raw.githubusercontent.com/php-pm/assets/master/start-command.png)

#### Symfony

[](#symfony)

```
cd my-project
docker run -v `pwd`:/var/www -p 8080:80 phppm/nginx --static-directory=web/
```

#### Laravel

[](#laravel)

```
cd my-project
docker run -v `pwd`:/var/www -p 8080:80 phppm/nginx --bootstrap=laravel --static-directory=web/
```

#### Zend

[](#zend)

```
cd my-project
docker run -v `pwd`:/var/www -p 8080:80 phppm/nginx --bootstrap=Zf2
```

#### Wordpress

[](#wordpress)

For all Wordpress lovers out there: PPM is not going to work with Wordpress due to the lack of request-response abstraction. We highly doubt that Wordpress is ever going to be compatible because its architecture is written in a way that makes it currently impossible to serve multiple requests in one application process.

### Performance (requests/s)

[](#performance-requestss)

6x4GHz Intel i7, 16GB RAM. 10 concurrent, 1000 total request: `ab -c 10 -n 1000 http://127.0.0.1:8080/`

#### Symfony, CMS application

[](#symfony-cms-application)

`ppm start --bootstrap=symfony --app-env=prod --logging=0 --debug=0 --workers=20`

PHP VersionDynamic at JarvesStatic file7.0.3, StreamSelectLoop2387,673944,525.6.18, StreamSelectLoop1663,562636,095.6.18, LibEventLoop1811,763441,72#### Laravel, example package

[](#laravel-example-package)

`ppm start --bootstrap=laravel --app-env=prod --debug=0 --logging=0 --workers=20`

[![](https://raw.githubusercontent.com/php-pm/assets/master/laravel.png)](https://raw.githubusercontent.com/php-pm/assets/master/laravel.png)

Issues
------

[](#issues)

- Memory leaks, memory leaks and memory leaks. You will also find leaks in your application. :) But no big issue since workers restart automatically.
- Does not work with ExtEventLoop. (So don't install `php70-event`, but you can try LibEventLoop `php56-libevent`)
- Drupal and Zend is very experimental and not fully working. Try using .
- Laravel's debugger isn't working perfectly yet since it's still needed to reset some stuff after each request.
- Streamed responses are not streamed yet
- No windows support due to signal handling

Please help us fix these issues by creating pull requests. :)

### Setup

[](#setup)

We provide ready-to-use docker images you can use right away. If you have own setup, see in the [PHP-PM docker repository](https://github.com/php-pm/php-pm-docker) how to integrate PHP-PM in your NGiNX setup.

#### Trusted proxy Symfony

[](#trusted-proxy-symfony)

To get the real remote IP in your Symfony application for example, don't forget to add ppm (default `127.0.0.1`) as trusted reverse proxy.

```
# app/config/config.yml
# ...
framework:
    trusted_proxies:  [127.0.0.1]
```

More information at [http://symfony.com/doc/current/cookbook/request/load\_balancer\_reverse\_proxy.html](http://symfony.com/doc/current/cookbook/request/load_balancer_reverse_proxy.html).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

3041d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/adc3d0e11e285a41f126df479eeb9c7b00107008c507b177ea2921ae1c314eda?d=identicon)[andreybolonin](/maintainers/andreybolonin)

---

Top Contributors

[![marcj](https://avatars.githubusercontent.com/u/450980?v=4)](https://github.com/marcj "marcj (110 commits)")[![andig](https://avatars.githubusercontent.com/u/184815?v=4)](https://github.com/andig "andig (85 commits)")[![trq](https://avatars.githubusercontent.com/u/32683?v=4)](https://github.com/trq "trq (14 commits)")[![maciejmrozinski](https://avatars.githubusercontent.com/u/1927895?v=4)](https://github.com/maciejmrozinski "maciejmrozinski (8 commits)")[![landrok](https://avatars.githubusercontent.com/u/3310446?v=4)](https://github.com/landrok "landrok (6 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (5 commits)")[![emielmolenaar](https://avatars.githubusercontent.com/u/2470795?v=4)](https://github.com/emielmolenaar "emielmolenaar (4 commits)")[![gsdevme](https://avatars.githubusercontent.com/u/319498?v=4)](https://github.com/gsdevme "gsdevme (4 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (4 commits)")[![udavka](https://avatars.githubusercontent.com/u/4341606?v=4)](https://github.com/udavka "udavka (4 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (3 commits)")[![dzubchik](https://avatars.githubusercontent.com/u/2685761?v=4)](https://github.com/dzubchik "dzubchik (2 commits)")[![itcreator](https://avatars.githubusercontent.com/u/928509?v=4)](https://github.com/itcreator "itcreator (2 commits)")[![Ingramz](https://avatars.githubusercontent.com/u/1017132?v=4)](https://github.com/Ingramz "Ingramz (2 commits)")[![cryptiklemur](https://avatars.githubusercontent.com/u/896295?v=4)](https://github.com/cryptiklemur "cryptiklemur (2 commits)")[![xoeoro](https://avatars.githubusercontent.com/u/6437303?v=4)](https://github.com/xoeoro "xoeoro (1 commits)")[![emgiezet](https://avatars.githubusercontent.com/u/1410665?v=4)](https://github.com/emgiezet "emgiezet (1 commits)")[![gnugat](https://avatars.githubusercontent.com/u/793185?v=4)](https://github.com/gnugat "gnugat (1 commits)")[![Im0rtality](https://avatars.githubusercontent.com/u/1804210?v=4)](https://github.com/Im0rtality "Im0rtality (1 commits)")[![kalessil](https://avatars.githubusercontent.com/u/1577185?v=4)](https://github.com/kalessil "kalessil (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andreybolonin-php-pm/health.svg)

```
[![Health](https://phpackages.com/badges/andreybolonin-php-pm/health.svg)](https://phpackages.com/packages/andreybolonin-php-pm)
```

###  Alternatives

[php-pm/php-pm

PHP-PM is a process manager, supercharger and load balancer for PHP applications.

6.6k441.3k8](/packages/php-pm-php-pm)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.4k37.3k](/packages/matomo-matomo)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

134391.5k12](/packages/rector-rector-src)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
