PHPackages                             shonm/php-resque-pool - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. shonm/php-resque-pool

ActiveLibrary[Queues &amp; Workers](/categories/queues)

shonm/php-resque-pool
=====================

php-resque worker pool manager

15.5k4PHP

Since Feb 1Pushed 6y agoCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

PHP Resque Pool
===============

[](#php-resque-pool)

Php resque pool is a port of [resque-pool](http://github.com/nevans/resque-pool)for managing [php-resque](http://github.com/chrisboulton/php-resque) workers. Given a config file, it manages your workers for you, starting up the appropriate number of workers for each worker type.

Benefits
--------

[](#benefits)

- Less config - With a simple YAML file, you can start up a pool daemon.
- Monitoring - If a worker dies for some reason, php-resque-pool will start another.
- Easily change worker distribution - To change your worker counts just update the YAML file and send the manager a HUP signal.

How to use
----------

[](#how-to-use)

### YAML file config

[](#yaml-file-config)

Create a `config/resque-pool.yml` (or `resque-pool.yml`) with your worker counts. The YAML file supports both using root level defaults as well as environment specific overrides (`RESQUE_ENV` environment variables can be used to determine environment). For example in `config/resque-pool.yml`:

```
foo: 1
bar: 2
"foo,bar,baz": 1

production:
  "foo,bar,baz": 4

```

### Start the pool manager

[](#start-the-pool-manager)

Then you can start the queues via:

```
bin/resque-pool --daemon --environment production

```

This will start up seven worker processes, one exclusively for the foo queue, two exclusively for the bar queue, and four workers looking at all queues in priority. With the config above, this is similar to if you ran the following:

```
QUEUES=foo php resque.php
QUEUES=bar php resque.php
QUEUES=bar php resque.php
QUEUES=foo,bar,baz php resque.php
QUEUES=foo,bar,baz php resque.php
QUEUES=foo,bar,baz php resque.php
QUEUES=foo,bar,baz php resque.php

```

The pool manager will stay around monitoring the resque worker parents, giving three levels: a single pool manager, many worker parents, and one worker child per worker (when the actual job is being processed). For example, `ps -ef f | grep [r]esque` (in Linux) might return something like the following:

```
resque    13858     1  0 13:44 ?        S      0:02 resque-pool-manager: managing [13867, 13875, 13871, 13872, 13868, 13870, 13876]
resque    13867 13858  0 13:44 ?        S      0:00  \_ resque-1.0: Waiting for foo
resque    13868 13858  0 13:44 ?        S      0:00  \_ resque-1.0: Waiting for bar
resque    13870 13858  0 13:44 ?        S      0:00  \_ resque-1.0: Waiting for bar
resque    13871 13858  0 13:44 ?        S      0:00  \_ resque-1.0: Waiting for foo,bar,baz
resque    13872 13858  0 13:44 ?        S      0:00  \_ resque-1.0: Forked 7481 at 1280343254
resque     7481 13872  0 14:54 ?        S      0:00      \_ resque-1.0: Processing foo since 1280343254
resque    13875 13858  0 13:44 ?        S      0:00  \_ resque-1.0: Waiting for foo,bar,baz
resque    13876 13858  0 13:44 ?        S      0:00  \_ resque-1.0: Forked 7485 at 1280343255
resque     7485 13876  0 14:54 ?        S      0:00      \_ resque-1.0: Processing bar since 1280343254

```

You can get similar output with pstree, or on some systems with `ps auxd | grep [r]esque`

Running as a daemon will currently output to stdout, although this will be configurable in the future.

SIGNALS
-------

[](#signals)

The pool manager responds to the following signals:

- `HUP` - reload the config file, restart all workers.
- `QUIT` - gracefully shut down workers (via `QUIT`) and shutdown the manager after all workers are done.
- `INT` - gracefully shut down workers (via `QUIT`) and immediately shutdown manager
- `TERM` - immediately shut down workers (via `INT`) and immediately shutdown manager *(configurable via command line options)*
- `WINCH` - *(only when running as a daemon)* send `QUIT` to each worker, but keep manager running (send `HUP` to reload config and restart workers)
- `USR1`/`USR2`/`CONT` - pass the signal on to all worker parents (see Resque docs).

Use `HUP` to change the number of workers per worker type. Signals can be sent via the `kill` command, e.g. `kill -HUP $master_pid`

Other Features
--------------

[](#other-features)

You can specify an alternate config file by setting the `RESQUE_POOL_CONFIG` or with the `--config` command line option.

Contributors
------------

[](#contributors)

- Your name here!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.9% of commits — single point of failure

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.

### Community

Maintainers

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

---

Top Contributors

[![ebernhardson](https://avatars.githubusercontent.com/u/558434?v=4)](https://github.com/ebernhardson "ebernhardson (9 commits)")[![ShonM](https://avatars.githubusercontent.com/u/511506?v=4)](https://github.com/ShonM "ShonM (8 commits)")

### Embed Badge

![Health badge](/badges/shonm-php-resque-pool/health.svg)

```
[![Health](https://phpackages.com/badges/shonm-php-resque-pool/health.svg)](https://phpackages.com/packages/shonm-php-resque-pool)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2228.8M171](/packages/react-async)[react/promise-stream

The missing link between Promise-land and Stream-land for ReactPHP

11512.9M45](/packages/react-promise-stream)[illuminate/bus

The Illuminate Bus package.

6043.8M409](/packages/illuminate-bus)

PHPackages © 2026

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