Skip to content

Commit 66f036e

Browse files
committed
Add notice about reloading php-fpm
1 parent 90ae66d commit 66f036e

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

contrib/php-fpm.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
/*
33
## Installing
44
5+
:::caution
6+
Do **not** reload php-fpm. Some user requests could fail or not complete in the
7+
process of reloading.
8+
9+
Instead, configure your server [properly](https://ï.at/avoid-php-fpm-reloading). If you're using Deployer's provision
10+
recipe, it's already configured the right way and no php-fpm reload is needed.
11+
:::
12+
513
Add to your _deploy.php_
614
715
```php
@@ -43,5 +51,6 @@
4351

4452
desc('Reload the php-fpm service');
4553
task('php-fpm:reload', function () {
54+
warning('Avoid reloading php-fpm [ï.at/avoid-php-fpm-reloading]');
4655
run('{{php_fpm_command}}');
4756
});

docs/contrib/php-fpm.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99

1010
## Installing
1111

12+
:::caution
13+
Do **not** reload php-fpm. Some user requests could fail or not complete in the
14+
process of reloading.
15+
16+
Instead, configure your server [properly](https://ï.at/avoid-php-fpm-reloading). If you're using Deployer's provision
17+
recipe, it's already configured the right way and no php-fpm reload is needed.
18+
:::
19+
1220
Add to your _deploy.php_
1321

1422
```php
@@ -38,14 +46,14 @@ after('deploy', 'php-fpm:reload');
3846

3947
## Configuration
4048
### php_fpm_version
41-
[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L32)
49+
[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L40)
4250

4351

4452

4553

4654

4755
### php_fpm_service
48-
[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L41)
56+
[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L49)
4957

5058

5159

@@ -55,7 +63,7 @@ after('deploy', 'php-fpm:reload');
5563

5664

5765
### php_fpm_command
58-
[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L42)
66+
[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L50)
5967

6068

6169

@@ -68,7 +76,7 @@ after('deploy', 'php-fpm:reload');
6876
## Tasks
6977

7078
### php-fpm:reload
71-
[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L45)
79+
[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L53)
7280

7381
Reload the php-fpm service.
7482

0 commit comments

Comments
 (0)