PPM is a process manager, supercharger and load balancer for modern PHP applications.

Overview

PPM - PHP Process Manager

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

Build Status Gitter

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)

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

Does your app/library support PPM? Show it!

PPM Compatible

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

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 for more information.

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

Use without Docker

Follow the wiki article Use without Docker.

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 https://github.com/reactphp/event-loop).

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

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

HttpKernel for Symfony/Laravel - https://github.com/php-pm/php-pm-httpkernel

Zend - https://github.com/php-pm/php-pm-zend

CakePHP - https://github.com/CakeDC/cakephp-phppm

Command

ppm-help

ppm-start

Symfony

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

Laravel

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

Zend

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

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)

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

Symfony, CMS application

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

https://github.com/jarves/jarves

PHP Version Dynamic at Jarves Static file
7.0.3, StreamSelectLoop 2387,67 3944,52
5.6.18, StreamSelectLoop 1663,56 2636,09
5.6.18, LibEventLoop 1811,76 3441,72

Laravel, example package

https://github.com/bestmomo/laravel5-example

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

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 https://github.com/php-pm/php-pm-drupal.
  • 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

We provide ready-to-use docker images you can use right away. If you have own setup, see in the PHP-PM docker repository how to integrate PHP-PM in your NGiNX setup.

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.

Comments
  • Memory leak issues in PHP 7.3

    Memory leak issues in PHP 7.3

    A couple of days a go we were updating our docker images to PHP 7.3 and after a while we started noticing some memory error crashes. After quite a lot of debugging we've come to the conclusion that both php 72 and php 73 leak memory in the master process (the slaves are fine) but 73 leaks memory MUCH faster, and the GC doesn't kick in before it crashes (at 128M of memory, it crashes before 1000 requests), while php72 does manage to kick in the GC and avoid the crash (if we disable the GC, php72 will also crash at around 2000 requests).

    We're not sure about the root cause of the leak in the master process, I'll keep investigating (it could also be a problem in reactphp). I've created a small repo as a PoC https://github.com/acasademont/php-pm-test

    bug core 
    opened by acasademont 30
  • Memory Leaks

    Memory Leaks

    I already submitted the ticket here https://github.com/php-pm/php-pm-httpkernel/issues/106 but I am not sure if that was the right place. I apologise for duplicating it. Feel free to delete this one if it does not belong to this package.

    I have setup new Laravel application without any additional packages or service providers it seems to be leaking memory on each request. I collected the below objects memory table using php meminfo extension. Every time new request is served array and string bytes almost doubles and constantly increasing.

    Memory Leaks:

                                                                                                                          │ime (ms)
    --- Worker 5501 stderr ---                                                                                             │  50%     24
    11546560                                                                                                               │  66%     34
    [24/May/2018:16:38:45 +0000] 172.19.0.9 - - "GET /catalog/product/view/id/34072 HTTP/1.0" 200 347109 "-"               │  75%     50
    13175728                                                                                                               │  80%   1380
    [24/May/2018:16:39:17 +0000] 172.19.0.9 - - "GET /catalog/product/view/id/34072 HTTP/1.0" 200 346935 "-"               │  90%   2856
    14878304                                                                                                               │  95%  11978
    [24/May/2018:16:42:07 +0000] 172.19.0.9 - - "GET /catalog/product/view/id/34072 HTTP/1.0" 200 346911 "-"               │  98%  17847
    16796656                                                                                                               │  99%  22491
    [24/May/2018:16:42:37 +0000] 172.19.0.9 - - "GET /catalog/product/view/id/34072 HTTP/1.0" 200 346889 "-"               │ 100%  30584 (longest request)
    

    With each request it is adding around 2MB of memory and not releasing it. I generated the meminfo and it is reporting all well, here is the summary:

    +---------+-----------------+-----------------------------+
    | Type    | Instances Count | Cumulated Self Size (bytes) |
    +---------+-----------------+-----------------------------+
    | string  | 160             | 5788                        |
    | boolean | 44              | 704                         |
    | array   | 9               | 648                         |
    | integer | 1               | 16                          |
    | float   | 1               | 16                          |
    +---------+-----------------+-----------------------------+
    

    I dumped the above summary inside PHPPM\Bootstrap\Laravel@postHandle method meminfo_dump(fopen('/tmp/my_dump_file.json', 'w')); I do not see any objects listed there which sounds strange to me unless I am misinterpretting it :(

    Some more Logs Ok I am able to fix the meminfo dump for my objects and here is the result for 2 requests.

    First/Initial Request:

    +------------------------------------------------------------+-----------------+-----------------------------+
    | Type                                                       | Instances Count | Cumulated Self Size (bytes) |
    +------------------------------------------------------------+-----------------+-----------------------------+
    | array                                                      | 1444            | 103968                      |
    | string                                                     | 1222            | 127053                      |
    | boolean                                                    | 328             | 5248                        |
    | null                                                       | 160             | 2560                        |
    | Closure                                                    | 118             | 8496                        |
    | integer                                                    | 105             | 1680                        |
    | Illuminate\Foundation\Application                          | 51              | 3672                        |
    | float                                                      | 34              | 544                         |
    | unknown                                                    | 31              | 496                         |
    | resource                                                   | 18              | 288                         |
    | React\Socket\Connection                                    | 10              | 720                         |
    | React\Stream\DuplexResourceStream                          | 10              | 720                         |
    | React\EventLoop\StreamSelectLoop                           | 9               | 648                         |
    | Illuminate\Routing\Router                                  | 9               | 648                         |
    | Illuminate\Http\Request                                    | 8               | 576                         |
    | Symfony\Component\VarDumper\Dumper\CliDumper               | 8               | 576                         |
    | Illuminate\Events\Dispatcher                               | 8               | 576                         |
    | React\Http\Io\MiddlewareRunner                             | 7               | 504                         |
    | Illuminate\Routing\Route                                   | 7               | 504                         |
    | DebugBar\DataFormatter\DataFormatter                       | 6               | 432                         |
    | Illuminate\Session\SessionManager                          | 6               | 432                         |
    | PHPPM\ProcessSlave                                         | 6               | 432                         |
    | React\Http\Io\HttpBodyStream                               | 6               | 432                         |
    | React\Http\Io\ServerRequest                                | 6               | 432                         |
    | Illuminate\Filesystem\Filesystem                           | 6               | 432                         |
    | React\Http\Io\CloseProtectionStream                        | 5               | 360                         |
    | React\Http\StreamingServer                                 | 4               | 288                         |
    | Illuminate\Session\Store                                   | 4               | 288                         |
    | Symfony\Component\HttpFoundation\ParameterBag              | 4               | 288                         |
    | PHPPM\Bootstraps\Laravel                                   | 4               | 288                         |
    | Symfony\Component\VarDumper\Cloner\VarCloner               | 4               | 288                         |
    | Illuminate\Http\Response                                   | 3               | 216                         |
    | RingCentral\Psr7\Uri                                       | 3               | 216                         |
    | Barryvdh\Debugbar\LaravelDebugbar                          | 3               | 216                         |
    | Illuminate\Hashing\HashManager                             | 3               | 216                         |
    | App\Http\Kernel                                            | 3               | 216                         |
    | Illuminate\Auth\AuthManager                                | 3               | 216                         |
    | RingCentral\Psr7\BufferStream                              | 3               | 216                         |
    | Illuminate\Auth\AuthServiceProvider                        | 3               | 216                         |
    | Illuminate\Foundation\Providers\FormRequestServiceProvider | 3               | 216                         |
    | Illuminate\Routing\RouteCollection                         | 3               | 216                         |
    | Illuminate\Database\Connectors\ConnectionFactory           | 3               | 216                         |
    | Barryvdh\Debugbar\ServiceProvider                          | 2               | 144                         |
    | Illuminate\Queue\QueueManager                              | 2               | 144                         |
    | Illuminate\Queue\QueueServiceProvider                      | 2               | 144                         |
    | Illuminate\Cookie\CookieJar                                | 2               | 144                         |
    | Illuminate\Auth\EloquentUserProvider                       | 2               | 144                         |
    | Barryvdh\Debugbar\SymfonyHttpDriver                        | 2               | 144                         |
    | Illuminate\Cookie\CookieServiceProvider                    | 2               | 144                         |
    [0] 0:bashM 1:docker- 2:[tmux]*                                                                                      
    

    Second Run/Request:

    +------------------------------------------------------------+-----------------+-----------------------------+
    | Type                                                       | Instances Count | Cumulated Self Size (bytes) |
    +------------------------------------------------------------+-----------------+-----------------------------+
    | array                                                      | 2131            | 153432                      |
    | string                                                     | 1387            | 208403                      |
    | boolean                                                    | 382             | 6112                        |
    | null                                                       | 205             | 3280                        |
    | integer                                                    | 149             | 2384                        |
    | Closure                                                    | 137             | 9864                        |
    | float                                                      | 62              | 992                         |
    | Illuminate\Foundation\Application                          | 59              | 4248                        |
    | unknown                                                    | 33              | 528                         |
    | Illuminate\Routing\Route                                   | 32              | 2304                        |
    | resource                                                   | 23              | 368                         |
    | React\Http\Io\ServerRequest                                | 18              | 1296                        |
    | Symfony\Component\VarDumper\Dumper\CliDumper               | 14              | 1008                        |
    | Illuminate\Routing\Router                                  | 13              | 936                         |
    | DebugBar\DataFormatter\DataFormatter                       | 12              | 864                         |
    | React\Stream\DuplexResourceStream                          | 10              | 720                         |
    | React\EventLoop\StreamSelectLoop                           | 10              | 720                         |
    | Illuminate\Http\Request                                    | 9               | 648                         |
    | Illuminate\Session\SessionManager                          | 9               | 648                         |
    | Illuminate\Events\Dispatcher                               | 9               | 648                         |
    | Illuminate\Filesystem\Filesystem                           | 9               | 648                         |
    | React\Http\Io\MiddlewareRunner                             | 9               | 648                         |
    | React\Socket\Connection                                    | 8               | 576                         |
    | Symfony\Component\HttpFoundation\ParameterBag              | 8               | 576                         |
    | Symfony\Component\VarDumper\Cloner\VarCloner               | 7               | 504                         |
    | PHPPM\ProcessSlave                                         | 6               | 432                         |
    | Illuminate\Session\Store                                   | 6               | 432                         |
    | React\Http\Io\HttpBodyStream                               | 6               | 432                         |
    | Barryvdh\Debugbar\LaravelDebugbar                          | 5               | 360                         |
    | Illuminate\Http\Response                                   | 5               | 360                         |
    | React\Http\Io\CloseProtectionStream                        | 5               | 360                         |
    | Barryvdh\Debugbar\DataCollector\GateCollector              | 4               | 288                         |
    | Barryvdh\Debugbar\DataFormatter\SimpleFormatter            | 4               | 288                         |
    | RingCentral\Psr7\Uri                                       | 4               | 288                         |
    | Illuminate\Auth\AuthServiceProvider                        | 4               | 288                         |
    | Symfony\Component\HttpFoundation\Cookie                    | 4               | 288                         |
    | RingCentral\Psr7\BufferStream                              | 4               | 288                         |
    | DebugBar\DataFormatter\DebugBarVarDumper                   | 4               | 288                         |
    | Swift_Plugins_MessageLogger                                | 4               | 288                         |
    | React\EventLoop\Timer\Timer                                | 3               | 216                         |
    | Illuminate\Auth\AuthManager                                | 3               | 216                         |
    | Illuminate\Hashing\HashManager                             | 3               | 216                         |
    | Barryvdh\Debugbar\SymfonyHttpDriver                        | 3               | 216                         |
    | Illuminate\Cookie\CookieServiceProvider                    | 3               | 216                         |
    

    I see the instances count for some of the objects in 2nd request has increased which means the previous objects were not cleared properly.

    BTW This is the PHP extension I used to get memory info of my objects: https://github.com/mathieuk/php-meminfo/tree/bugfix/use_correct_symbol_table_php71

    opened by aftabnaveed 30
  • Laravel weird behaviour with cookies/sessions?

    Laravel weird behaviour with cookies/sessions?

    I'm testing it with my Laravel project, but I get some really weird things. Sometimes when I refresh i'm logged out. Also a lot of times ajax call's can't be return because it thinks i'm not logged in.

    opened by sweebee 28
  • [WIP] Update React components, mainly HTTP

    [WIP] Update React components, mainly HTTP

    • [X] Update React components to newest versions
    • [X] Make PSR7 compatible
    • [X] Operate on static files without BridgeInterface, remove GetStaticDirectory method from BridgeInterface and BootstrapInterface, add static-directory config, remove static config
    • [x] Try/catch exceptions from Bridge and return 500
    • [x] Log correct response size
    • [x] Make usage of $_SERVER var optional
    • [x] Update to use ServerRequestInterface instead RequestInterface
    • [x] BridgeInterface extends DelegateInterface
    • [ ] Check base features (listed here https://github.com/php-pm/php-pm/pull/226#issuecomment-289617319)
    • [ ] Clean up composer.json, remove repositories entries
    opened by maciejmrozinski 28
  • Master process leaks

    Master process leaks

    Readme says:

    Memory leaks, memory leaks and memory leaks. You will find also leaks in your application. :) But no big issue since worker restart automatically.

    But actualy Master process fails with

    Fatal error: Allowed memory size of ...

    on something like ab -c 32 -n 1000000 http://127.0.0.1:8080/ (with simpliest symfony app) And it will not be restarted. So i think it's big issue

    opened by kugu 27
  • Avoiding multiple restart of slave processes

    Avoiding multiple restart of slave processes

    In the Debug mode ProcessManager::checkChangedFiles() restarts slaves immediately when first modified file has found. If more then one watched files were changed, restarting process repeats so many times, how many files have changed.

    I think we should detect all the changes and restart slaves only once per one detection cycle.

    enhancement 
    opened by AntonTyutin 23
  • Exit worker more cleanly

    Exit worker more cleanly

    Currently when ProcessSlave exits, the application's registered shutdown functions sometimes do not execute because our shutdown calls exit internally (when a registered shutdown function calls exit, the others do not execute, as mentioned in the documentation).

    This PR makes the worker exit more cleanly, by not calling exit inside the worker's shutdown function, but outside of it.

    opened by dnna 21
  • Implement reload command, graceful shutdowns

    Implement reload command, graceful shutdowns

    What was missing was a function to reload the workers in a production setting a la debug hot code reload, however I don't like that since it kills any ongoing requests, which might have consequences...

    This is a summary of the changes:

    • Adds the reload command, which performs a graceful in-place reload that waits for workers to finish. Workers are replaced as soon as they are not in a busy state.
    • So the above can work, slaves will enter a "locked" state if discovered to be busy during the reload loop, to stop them from returning to a ready state.
    • Adds the reload-threshold setting, which will determine for how long in seconds a graceful reload is attempted before the worker is outright killed. Defaults at 30, -1 to disable.
    • Makes a distinction between reload and restart in code, to be more in line with how this terminology is used. restartSlaves was using a inReload semaphore; this has been changed to inRestart.
    opened by fiskWasTaken 21
  • Drupal integration

    Drupal integration

    I've been working on Drupal integration, currently a new Bootstrap.

    In the end, would you want this merged into the main PHP-PM project, or do you prefer to keep it separate?

    opened by kentr 19
  • Symfony 4 support

    Symfony 4 support

    Hello,

    are there any informations for symfony 4 / symfony flex support. I try it some minutes ago, but he have problems with the missing AppKernel.

    This is my output:

    +---------------------+---------------------+
    | bridge              | HttpKernel          |
    | host                | 127.0.0.1           |
    | port                | 8080                |
    | workers             | 8                   |
    | app-env             | dev                 |
    | debug               | 1                   |
    | logging             | 1                   |
    | static              | 1                   |
    | bootstrap           | Symfony             |
    | max-requests        | 1000                |
    | concurrent-requests |                     |
    | socket-path         | .ppm/run/           |
    | pidfile             | .ppm/ppm.pid        |
    | cgi-path            | /usr/bin/php-cgi7.1 |
    +---------------------+---------------------+
    Starting PHP-PM with 8 workers, using StreamSelectLoop ...
    --- Worker 5508 stderr ---
    PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "AppKernel" from the global namespace.
    Did you forget a "use" statement for "Symfony\Bundle\FrameworkBundle\Tests\Functional\app\AppKernel"? in /var/php-pm/vendor/php-pm/httpkernel-adapter/Bootstraps/Symfony.php:60
    Stack trace:
    #0 /var/php-pm/vendor/php-pm/httpkernel-adapter/Bridges/HttpKernel.php(57): PHPPM\Bootstraps\Symfony->getApplication()
    #1 /var/php-pm/ProcessSlave.php(236): PHPPM\Bridges\HttpKernel->bootstrap('\\PHPPM\\Bootstra...', 'dev', true, Object(React\EventLoop\StreamSelectLoop))
    #2 /var/php-pm/ProcessSlave.php(333): PHPPM\ProcessSlave->bootstrap('Symfony', 'dev', true)
    #3 /var/php-pm/ProcessCommunicationTrait.php(33): PHPPM\ProcessSlave->commandBootstrap(Array, Object(React\Socket\Connection))
    #4 /var/php-pm/ProcessCommunicationTrait.php(57): PHPPM\ProcessSlave->processMessage('{"cmd":"bootstr...', Object(React\Socket\Connection))
    #5 [internal function]: PHPPM\ProcessSlave->PHPPM\{closure}('{"cmd":"boots in /var/php-pm/vendor/php-pm/httpkernel-adapter/Bootstraps/Symfony.php on line 60
    Class 'AppKernel' not found
    Fatal Error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "AppKernel" from the global namespace.
    Did you forget a "use" statement for "Symfony\Bundle\FrameworkBundle\Tests\Functional\app\AppKernel"? in /var/php-pm/vendor/php-pm/httpkernel-adapter/Bootstraps/Symfony.php:60
    Stack trace:
    #0 /var/php-pm/vendor/php-pm/httpkernel-adapter/Bridges/HttpKernel.php(57): PHPPM\Bootstraps\Symfony->getApplication()
    #1 /var/php-pm/ProcessSlave.php(236): PHPPM\Bridges\HttpKernel->bootstrap('\\PHPPM\\Bootstra...', 'dev', true, Object(React\EventLoop\StreamSelectLoop))
    #2 /var/php-pm/ProcessSlave.php(333): PHPPM\ProcessSlave->bootstrap('Symfony', 'dev', true)
    #3 /var/php-pm/ProcessCommunicationTrait.php(33): PHPPM\ProcessSlave->commandBootstrap(Array, Object(React\Socket\Connection))
    #4 /var/php-pm/ProcessCommunicationTrait.php(57): PHPPM\ProcessSlave->processMessage('{"cmd":"bootstr...', Object(React\Socket\Connection))
    #5 [internal function]: PHPPM\ProcessSlave->PHPPM\{closure}('{"cmd":"boots
    
    Application bootstrap failed. We are entering emergency mode now. All offline. Waiting for file changes ...
    
    Application bootstrap failed. We are still in emergency mode. All offline. Waiting for file changes ...
    
    Application bootstrap failed. We are still in emergency mode. All offline. Waiting for file changes ...
    
    Application bootstrap failed. We are still in emergency mode. All offline. Waiting for file changes ...
    
    Application bootstrap failed. We are still in emergency mode. All offline. Waiting for file changes ...
    
    Application bootstrap failed. We are still in emergency mode. All offline. Waiting for file changes ...
    
    Application bootstrap failed. We are still in emergency mode. All offline. Waiting for file changes ...
    
    Application bootstrap failed. We are still in emergency mode. All offline. Waiting for file changes ...
    
    

    Thanks for your answer

    enhancement 
    opened by andreastoermer 18
  • RequestHandler::$slave undefined error in debug mode

    RequestHandler::$slave undefined error in debug mode

    Hello, I see workers dead permanently after I changed a file. Here is the log:

    logs -f web
    Attaching to cdp-web-web
    cdp-web-web           | CMD: /ppm/vendor/bin/ppm start --ansi --port=8081 --socket-path=/ppm/run --pidfile=/ppm/ppm.pid --static-directory='' --bootstrap=symfony --debug=1 --app-env=dev --workers=3 --memory-limit=512M -vv
    cdp-web-web           | PID: 24
    cdp-web-web           | Checking if pid 24 is still running
    cdp-web-web           | Waiting 24 to complete...
    cdp-web-web           | /var/www
    cdp-web-web           | +---------------------+-------------------+
    cdp-web-web           | | bridge              | HttpKernel        |
    cdp-web-web           | | host                | 127.0.0.1         |
    cdp-web-web           | | port                | 8081              |
    cdp-web-web           | | workers             | 3                 |
    cdp-web-web           | | app-env             | dev               |
    cdp-web-web           | | debug               | 1                 |
    cdp-web-web           | | logging             | 1                 |
    cdp-web-web           | | static-directory    | ''                |
    cdp-web-web           | | bootstrap           | symfony           |
    cdp-web-web           | | max-requests        | 1000              |
    cdp-web-web           | | max-execution-time  | 30                |
    cdp-web-web           | | memory-limit        | 512               |
    cdp-web-web           | | ttl                 | 0                 |
    cdp-web-web           | | populate-server-var | 1                 |
    cdp-web-web           | | socket-path         | /ppm/run          |
    cdp-web-web           | | pidfile             | /ppm/ppm.pid      |
    cdp-web-web           | | reload-timeout      | 30                |
    cdp-web-web           | | cgi-path            | /usr/bin/php-cgi7 |
    cdp-web-web           | +---------------------+-------------------+
    cdp-web-web           | Starting PHP-PM with 3 workers, using StreamSelectLoop ...
    cdp-web-web           | Start new worker #5501
    cdp-web-web           | Start new worker #5502
    cdp-web-web           | Start new worker #5503
    cdp-web-web           | Worker #5501 registered. Waiting for application bootstrap ... 
    cdp-web-web           | Worker #5502 registered. Waiting for application bootstrap ... 
    cdp-web-web           | Worker #5503 registered. Waiting for application bootstrap ... 
    cdp-web-web           | Worker #5501 ready.
    cdp-web-web           | Received 1238 new files from 5501. Stats collection cycle: 1236 files, 1426.331 ms
    cdp-web-web           | Worker #5502 ready.
    cdp-web-web           | Received 1 new files from 5502. Stats collection cycle: 1237 files, 0.316 ms
    cdp-web-web           | Worker #5503 ready.
    cdp-web-web           | 3 workers (starting at 5501) up and ready. Application is ready at http://127.0.0.1:8081/
    cdp-web-web           | Received 1 new files from 5503. Stats collection cycle: 1238 files, 0.237 ms
    cdp-web-web           | Received 228 new files from 5501. Stats collection cycle: 1466 files, 268.800 ms
    cdp-web-web           | Current memory usage for worker 5501: 20.00 MB
    cdp-web-web           | [07/Oct/2019:15:29:33 +0000] 127.0.0.1 - - "GET /api/account HTTP/1.0" 200 474 "-"
    cdp-web-web           | Worker 5501 took abnormal 7.658 seconds for handling a connection
    cdp-web-web           | Received 45 new files from 5501. Stats collection cycle: 1511 files, 49.411 ms
    cdp-web-web           | Current memory usage for worker 5501: 20.00 MB
    cdp-web-web           | [07/Oct/2019:15:30:27 +0000] 127.0.0.1 - - "POST /login HTTP/1.0" 200 502 "-"
    cdp-web-web           | Worker 5501 took abnormal 6.461 seconds for handling a connection
    cdp-web-web           | Current memory usage for worker 5501: 20.00 MB
    cdp-web-web           | [07/Oct/2019:15:30:44 +0000] 127.0.0.1 - - "POST /login HTTP/1.0" 200 502 "-"
    cdp-web-web           | Worker 5501 took abnormal 6.212 seconds for handling a connection
    cdp-web-web           | Current memory usage for worker 5501: 20.00 MB
    cdp-web-web           | [07/Oct/2019:15:31:07 +0000] 127.0.0.1 - - "GET /api/account HTTP/1.0" 200 448 "-"
    cdp-web-web           | Worker 5501 took abnormal 7.175 seconds for handling a connection
    

    Then I changed a file:

    cdp-web-web           | [07/Oct/2019:15:31:26 +0000] File /var/www/src/Controller/AccountController.php has changed.
    cdp-web-web           | [07/Oct/2019:15:31:26 +0000] At least one of 1511 known files was changed. Reloading workers.
    cdp-web-web           | Changes detection cycle length = 458.966 ms
    cdp-web-web           | Start new worker #5501
    cdp-web-web           | Start new worker #5502
    cdp-web-web           | Start new worker #5503
    cdp-web-web           | Worker #5502 registered. Waiting for application bootstrap ... 
    cdp-web-web           | Worker #5501 registered. Waiting for application bootstrap ... 
    cdp-web-web           | Worker #5502 ready.
    cdp-web-web           | Received 1 new files from 5502. Stats collection cycle: 1512 files, 0.226 ms
    cdp-web-web           | Worker #5503 registered. Waiting for application bootstrap ... 
    cdp-web-web           | Worker #5501 ready.
    cdp-web-web           | Received 1 new files from 5501. Stats collection cycle: 1513 files, 0.192 ms
    cdp-web-web           | Worker #5503 ready.
    cdp-web-web           | Received 1 new files from 5503. Stats collection cycle: 1514 files, 0.231 ms
    cdp-web-web           | [07/Oct/2019:15:31:46 +0000] File /var/www/var/cache/dev/UrlMatcher.php has changed.
    cdp-web-web           | [07/Oct/2019:15:31:46 +0000] At least one of 1514 known files was changed. Reloading workers.
    cdp-web-web           | Changes detection cycle length = 1500.104 ms
    cdp-web-web           | Start new worker #5501
    cdp-web-web           | Start new worker #5502
    cdp-web-web           | Start new worker #5503
    cdp-web-web           | [07/Oct/2019:15:31:48 +0000] File /var/www/var/cache/dev/UrlGenerator.php has changed.
    cdp-web-web           | [07/Oct/2019:15:31:48 +0000] At least one of 1514 known files was changed. Reloading workers.
    cdp-web-web           | Changes detection cycle length = 1606.775 ms
    cdp-web-web           | Start new worker #5501
    cdp-web-web           | Start new worker #5502
    cdp-web-web           | Start new worker #5503
    cdp-web-web           | Worker 5501 took abnormal 6.264 seconds for handling a connection
    cdp-web-web           | Script did not return a valid HTTP response. Maybe it has called exit() prematurely?
    cdp-web-web           | Worker #5501 registered. Waiting for application bootstrap ... 
    cdp-web-web           | Worker #5503 registered. Waiting for application bootstrap ... 
    cdp-web-web           | Worker #5501 ready.
    cdp-web-web           | Received 1 new files from 5501. Stats collection cycle: 1515 files, 0.235 ms
    cdp-web-web           | Worker #5502 registered. Waiting for application bootstrap ... 
    cdp-web-web           | Worker #5503 ready.
    cdp-web-web           | Received 1 new files from 5503. Stats collection cycle: 1516 files, 0.198 ms
    cdp-web-web           | Worker #5502 wanted to register on master which was not expected.
    cdp-web-web           | Worker permanently closed during PHP-PM bootstrap. Not so cool. Not your fault, please create a ticket at github.com/php-pm/php-pm with the output of `ppm start -vv`.
    cdp-web-web           | Worker #5502 ready.
    cdp-web-web           | Received 1 new files from 5502. Stats collection cycle: 1517 files, 0.170 ms
    cdp-web-web           | Worker #5503 wanted to register on master which was not expected.
    cdp-web-web           | Worker permanently closed during PHP-PM bootstrap. Not so cool. Not your fault, please create a ticket at github.com/php-pm/php-pm with the output of `ppm start -vv`.
    cdp-web-web           | Worker #5501 wanted to register on master which was not expected.
    cdp-web-web           | Worker permanently closed during PHP-PM bootstrap. Not so cool. Not your fault, please create a ticket at github.com/php-pm/php-pm with the output of `ppm start -vv`.
    

    What this line is mean?

    cdp-web-web           | Script did not return a valid HTTP response. Maybe it has called exit() prematurely?
    

    In the file, I've just changed HTTP response code to 201 from 200 (purely for test how ppm handles files reloading in developer mode)

    Next, I've sent that request again:

    cdp-web-web           | Connection to worker 5501 failed. Try #1, took 0.001s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.672 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #2, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.747 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #3, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.376 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #4, took 0.001s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.447 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #5, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.494 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #6, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.541 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #7, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.439 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #8, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.758 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #9, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.407 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #10, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.356 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #11, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.334 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #12, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.465 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #13, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.193 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #14, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.219 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #15, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.207 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #16, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.340 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #17, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.343 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #18, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.560 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #19, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.751 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #20, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.735 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #21, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | took abnormal 1.688 seconds for choosing next free worker
    cdp-web-web           | Connection to worker 5501 failed. Try #22, took 0.000s (timeout 10s). Error message: [111] Unable to connect to unix domain socket "unix:///ppm/run/5501.sock": Connection refused
    cdp-web-web           | 
    cdp-web-web           | In RequestHandler.php line 271:
    cdp-web-web           |                                                             
    cdp-web-web           |   [ErrorException]                                          
    cdp-web-web           |   Notice: Undefined property: PHPPM\RequestHandler::$slave  
    cdp-web-web           |                                                             
    cdp-web-web           | 
    cdp-web-web           | Exception trace:
    cdp-web-web           |   at /ppm/vendor/php-pm/php-pm/src/RequestHandler.php:271
    cdp-web-web           |  PHPPM\RequestHandler->maxExecutionTimeExceeded() at /ppm/vendor/react/event-loop/src/Timer/Timers.php:96
    cdp-web-web           |  React\EventLoop\Timer\Timers->tick() at /ppm/vendor/react/event-loop/src/StreamSelectLoop.php:183
    cdp-web-web           |  React\EventLoop\StreamSelectLoop->run() at /ppm/vendor/php-pm/php-pm/src/ProcessManager.php:521
    cdp-web-web           |  PHPPM\ProcessManager->run() at /ppm/vendor/php-pm/php-pm/src/Commands/StartCommand.php:52
    cdp-web-web           |  PHPPM\Commands\StartCommand->execute() at /ppm/vendor/symfony/console/Command/Command.php:255
    cdp-web-web           |  Symfony\Component\Console\Command\Command->run() at /ppm/vendor/symfony/console/Application.php:915
    cdp-web-web           |  Symfony\Component\Console\Application->doRunCommand() at /ppm/vendor/symfony/console/Application.php:272
    cdp-web-web           |  Symfony\Component\Console\Application->doRun() at /ppm/vendor/symfony/console/Application.php:148
    cdp-web-web           |  Symfony\Component\Console\Application->run() at /ppm/vendor/php-pm/php-pm/bin/ppm:47
    cdp-web-web           | 
    cdp-web-web           | start [--bridge BRIDGE] [--host HOST] [--port PORT] [--workers WORKERS] [--app-env APP-ENV] [--debug DEBUG] [--logging LOGGING] [--static-directory STATIC-DIRECTORY] [--max-requests MAX-REQUESTS] [--max-execution-time MAX-EXECUTION-TIME] [--memory-limit MEMORY-LIMIT] [--ttl TTL] [--populate-server-var POPULATE-SERVER-VAR] [--bootstrap BOOTSTRAP] [--cgi-path CGI-PATH] [--socket-path SOCKET-PATH] [--pidfile PIDFILE] [--reload-timeout RELOAD-TIMEOUT] [-c|--config CONFIG] [--] [<working-directory>]
    cdp-web-web           | 
    cdp-web-web           | Server is shutting down.
    cdp-web-web           | Worker #5501 terminated, 2 more worker(s) to close.
    cdp-web-web           | Worker #5502 terminated, 1 more worker(s) to close.
    cdp-web-web           | Worker #5503 terminated, 0 more worker(s) to close.
    cdp-web-web           | Stopping the process manager.
    cdp-web-web           | PID   USER     TIME  COMMAND
    cdp-web-web           |     1 root      0:00 /bin/bash /etc/app/run.sh --bootstrap=symfony --debug=1 --app-env=dev --workers=3 --memory-limit=512M -vv
    cdp-web-web           |    17 root      0:00 nginx: master process nginx
    cdp-web-web           |    18 nginx     0:00 nginx: worker process
    cdp-web-web           |    19 nginx     0:00 nginx: worker process
    cdp-web-web           |    20 nginx     0:00 nginx: worker process
    cdp-web-web           |    21 nginx     0:00 nginx: worker process
    cdp-web-web           |    45 root      0:00 ps ax
    cdp-web-web           | /etc/app/run.sh: line 1: warning: run_pending_traps: bad value in trap_list[17]: 0x563771021dd3
    cdp-web-web           | /etc/app/run.sh: line 1: kill: (24) - No such process
    cdp-web-web           | Trapped CHLD. Sending signal CHLD to PID 24
    cdp-web-web exited with code 1
    
    bug core information needed 
    opened by stepanselyuk 17
  • Add posibility to restart workers immediately after TTL will expire

    Add posibility to restart workers immediately after TTL will expire

    Hi, I've noticed that when ttl is set and expired then all workers are restarted in the same time. This causes bigger lag with response from ppm. It is bigger problem when bootstrap of application is heavy.

    My proposal is to add another strategy to handle workers restart when ttl will expire. Workers will be restarted immediately after ttl will expire +/-5 sec. This should keep workers fresh and should prevent workers from restarting at the same time.

    To enable this behavior ttl-restart-strategy cli parameter or config parameter need to be set on expire. By default ppm will restart workers due to ttl expiration only when request will be received. As it is handled in current implementation.

    opened by zwirek 3
  • Add support for setting $_SERVER['HTTPS'] var

    Add support for setting $_SERVER['HTTPS'] var

    I replaced my php-fpm with that project for Laravel and use a NGINX proxy in front of it. With PHP FPM i had a scheme detection which was set the HTTPS var on FastCGI for forcing Laravel to generate https urls. After I run that with php-ppm i noticed that the X-Forwarded-Proto is not working, as i looked in the code i saw that this var is not parsed and no HTTPS var is set on $_SERVER array.

    So that pull request to fix that.

    opened by Jonas18175 0
  • Getting random

    Getting random "Script did not return a valid HTTP response"

    I came across this library and thought I'd give it a try. The speed improvements are amazing but I'm getting "Script did not return a valid HTTP response. Maybe it has called exit() prematurely?" from time to time, as I am browsing through the different pages.

    I'm running ./vendor/bin/ppm start --static-directory=public/ --app-env=prod --logging=0 --debug=0 on a symfony 4.4 application, on my local machine (ubuntu 20).

    When I'm running with debug and logging, it doesn't really help, here is a sample output:

    [23/Feb/2022:08:11:52 +0200] 127.0.0.1 - - "GET /admin/ajax/taxons/leafs HTTP/1.1" 200 21812 "http://localhost:8080/admin/products/15950/edit"
    [23/Feb/2022:08:11:55 +0200] 127.0.0.1 - - "GET /admin/products/ HTTP/1.1" 200 112551 "http://localhost:8080/admin/products/"
    Script did not return a valid HTTP response. Maybe it has called exit() prematurely?
    

    I searched for relevant issues, but didn't really find an answer. It's got something to do with the client closing the connection? Why would that happen?

    opened by PalTamasWBA 2
  • RuntimeException: Unable to connect to unix domain socket

    RuntimeException: Unable to connect to unix domain socket

    Some requests failed on following exception

    RuntimeException: Unable to connect to unix domain socket "unix:///var/www/html/.ppm/run/5501.sock": Connection refused (ECONNREFUSED) #111 in /var/www/html/vendor/react/socket/src/UnixConnector.php:40  @  CLI (PID: 3377): vendor/bin/ppm start --config=ppm.json
    

    I have newest version of php-pm. Can somebody help me?

    opened by krajcikondra 1
  • Does PHP-PM works on eventloop?

    Does PHP-PM works on eventloop?

    As reading Issues section in Readme "Does not work with ExtEventLoop. (So don't install php70-event, but you can try LibEventLoop php56-libevent)"

    But seems like when I tried with PHP 7.4 with EventLoop it shows that works.

    image

    image

    opened by arunnabraham 1
Releases(2.4.0)
  • 2.4.0(Mar 16, 2022)

  • 2.3.0(Jan 9, 2022)

  • 2.2.3(Jan 9, 2022)

  • 2.2.2(Apr 16, 2021)

  • 2.2.1(Feb 4, 2021)

  • 2.2.0(Dec 14, 2020)

  • 2.1.3(Aug 12, 2020)

  • 2.1.2(Aug 12, 2020)

    New features:

    • Log Slave HTTP server exceptions #251

    Bug fixes:

    • Better detection of changed files while on debug mode
    • Keep previous PID file when starting another php-pm instance by mistake #314
    • Fix attempting to close a Slave that never connected in the first place #467 #470
    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Jul 28, 2020)

  • 2.1.0(Jul 24, 2020)

  • 2.0.4(Jun 2, 2020)

  • 2.0.3(Jan 13, 2020)

    Bug fixes:

    • Fix deprecated syfmony/debug component messages (#487)
    • Increase default TCP backlog to match other known servers (#488)
    • Avoid excessive logs if the client connection is already closed (#489)

    Note: #488 should allow a performance increase in higher-load situations where previous versions quickly became saturated. Upgrading is highly encouraged.

    We welcome @acasademont to the team and thank him for providing the fixes above.

    Source code(tar.gz)
    Source code(zip)
  • 2.0.2(Dec 5, 2019)

  • 2.0.1(Sep 26, 2019)

  • 2.0(Mar 20, 2019)

    Improvements:

    • Upgrade interfaces to PSR15 RequestHandlerInterface (#335) The upgrade to PSR15 is a BC break as method signatures for the BridgeInterface has changed.

    New features:

    • Implemented daemon mode (#351)
    • Added memory-limit parameter (#418)

    Backward-incompatible changes:

    • minimum required PHP version is ^7.1
    • minimum supported Symfony version is ^3.4
    Source code(tar.gz)
    Source code(zip)
  • 1.0.5(Sep 16, 2018)

    Improvements:

    • Implement memory-limit parameter (#418)
    • Handle bridge exceptions by restarting worker (#426)
    • Trigger shutdown functions on closing worker (#428)

    Bug fixes:

    • Fix server shutdown when all worker are crashed (#422)
    • Fix version conflict error on PHP 7 (#431)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.4(Aug 11, 2018)

    New features:

    • Return HTTP 502 when slave returns empty response (#411)
    • Return HTTP 503 when there is no available slave after a set period (#411)
    • Return HTTP 504 when downstream response exceeeds max-execution-time (#413)

    Big thank you for his contributions to @dnna

    Bug fixes:

    • Fix memory when client went away before worker aquired (#414)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.3(Jul 23, 2018)

    New features:

    • Added worker TTL option (#392, #395)

    Improvements:

    • Allow nginx to set REMOTE_ADDR (#354)
    • Add query string to $_SERVER['REQUEST_URI'] (#364)
    • Fix reloading after emergency mode (#398, #400)
    • Upgrade reactphp dependencies (#399, #401)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Apr 14, 2018)

    New features:

    • Add reload command and graceful shutdowns (#365)

    Improvements:

    • Avoid excessive slave restarts when multiple watched files change (#348)
    • Fix servers with many workers stuck in starting phase (#366)
    • Added compatibility with symfony 4 (#360)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Jan 9, 2018)

  • 1.0.0(Jan 8, 2018)

    First stable release of php-pm.

    Includes:

    • static web server bridge
    • PSR7 middleware bridge
    • HttpKernel bridge for Symfony 3+
    • Internal refactoring to improve stability
    • ReactPHP/http 0.8 with tons of new improvements (multipart parsing/file upload)
    • Docker images ready to use: https://github.com/php-pm/php-pm-docker
    cd my/symfony-project/
    
    # configure
    $ docker run -v `pwd`:/var/www/  phppm/ppm:1.0 config
    
    # run
    $ docker run --name ppm --rm -v `pwd`:/var/www -e PPM_STATIC=./web/ -p 8080:80 phppm/nginx:1.0
    
    

    Supports:

    • php 5.6
    • php 7
    Source code(tar.gz)
    Source code(zip)
Owner
PPM - PHP Process Manager
PPM - PHP Process Manager
🤯 High-performance PHP application server, load-balancer and process manager written in Golang

RoadRunner is an open-source (MIT licensed) high-performance PHP application server, load balancer, and process manager. It supports running as a serv

Spiral Scout 6.9k Jan 3, 2023
Not really a load balancer.

302 This is a load balancer that doesn't act as a load balancer. It is a redirect balancer. Instead of forwarding traffic to a specific host/port, it

52 Entertainment 10 Mar 16, 2022
QPM, the process management framework in PHP, the efficient toolkit for CLI development. QPM provides basic daemon functions and supervision mechanisms to simplify multi-process app dev.

QPM QPM全名是 Quick(or Q's) Process Management Framework for PHP. PHP 是强大的web开发语言,以至于大家常常忘记PHP 可以用来开发健壮的命令行(CLI)程序以至于daemon程序。 而编写daemon程序免不了与各种进程管理打交道。Q

Comos 75 Dec 21, 2021
Framework for building extensible server-side progressive applications for modern PHP.

Chevere ?? Subscribe to the newsletter to don't miss any update regarding Chevere. Framework for building extensible server-side progressive applicati

Chevere 65 Jan 6, 2023
AbuseIO is a toolkit to receive, process, correlate and notify about abuse reports received by network operators, typically hosting and access providers.

AbuseIO - Abusemanagement tools AbuseIO is a toolkit to receive, process, correlate and notify end users about abuse reports received by network opera

AbuseIO 189 Dec 6, 2022
Framework agnostic package to load heavy JSON in lazy collections.

Lazy JSON Framework agnostic package to load heavy JSON in lazy collections. Under the hood, the brilliant JSON Machine by @halaxa is used as lexer an

Andrea Marco Sartori 155 Dec 1, 2022
Multi-process coroutine edition Swoole spider !! Learn about Swoole's network programming and the use of its related APIs

swoole_spider php bin/spider // Just do it !! Cache use Swoole\Table; use App\Table\Cache; $table = new Table(1<<20); // capacity size $table->column

null 3 Apr 22, 2021
A modern, ultra lightweight and rocket fast Content Management System

Redaxscript A modern, ultra lightweight and rocket fast Content Management System for SQLite, MSSQL, MySQL and PostgreSQL. Installation Clone the repo

redaxscript 247 Nov 12, 2022
Ergonode is modern PIM platform based on Symfony and Vue.js frameworks.

Modern Product Information Management Platform Ergonode is modern PIM platform based on Symfony and Vue.js frameworks. It has modular structure and gi

Ergonode 100 Dec 19, 2022
High-Performance Long-Living PHP Framework for modern enterprise application development

Documentation · Discord · Telegram · Twitter Spiral Framework is a High-Performance Long-Living Full-Stack framework and group of over sixty PSR-compa

Spiral Scout 1.4k Jan 1, 2023
:gem: Go! AOP PHP - modern aspect-oriented framework for the new level of software development

Go! Aspect-Oriented Framework for PHP Go! AOP is a modern aspect-oriented framework in plain PHP with rich features for the new level of software deve

Go! Aspect-Oriented Framework 1.6k Dec 29, 2022
FrankenPHP is a modern application server for PHP built on top of the Caddy web server

FrankenPHP: Modern App Server for PHP FrankenPHP is a modern application server for PHP built on top of the Caddy web server. FrankenPHP gives superpo

Kévin Dunglas 2.8k Jan 2, 2023
FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Ruby on Rails.

FlyCubePHP FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Rub

Anton 1 Dec 21, 2021
Simple RBAC Manager for Yii2 (minify of yii2-admin)

Yii2 Mimin Simple RBAC Manager fo Yii 2.0. Minify of yii2-admin extension with awesome features Attention Before you install and use this extension, t

Hafid Mukhlasin 52 Sep 22, 2022
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.

Slim Framework Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs. Installation It's recommended

Slim Framework 11.5k Jan 4, 2023
A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast! Condensed in a single ~65KB file

Bong Cosca 2.6k Dec 30, 2022
Mind is the PHP code framework designed for developers. It offers a variety of solutions for creating design patterns, applications and code frameworks.

Mind Mind is the PHP code framework designed for developers. It offers a variety of solutions for creating design patterns, applications and code fram

null 0 Dec 13, 2021
Woski is a fast and simple lightweight PHP Framework for building applications in the realm of the web.

Woski is a simple fast PHP framework for the Realm The Project Installation Clone the repository $ composer create-project clintonnzedimma/woski myApp

Clinton Nzedimma 19 Aug 15, 2022
This component may look complex, weird and full of hacks but it is a game changer for how we run PHP applications.

PHP Runtimes In early 2021, Symfony created a "Runtime component". This component may look complex, weird and full of hacks but it is a game changer f

Runtime 321 Dec 25, 2022