Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All fpm-processes are blocked results in 504 #1969

Closed
SebastianRzk opened this issue Apr 16, 2023 · 5 comments
Closed

All fpm-processes are blocked results in 504 #1969

SebastianRzk opened this issue Apr 16, 2023 · 5 comments

Comments

@SebastianRzk
Copy link

SebastianRzk commented Apr 16, 2023

What does happen:

  • Nextcloud is not accessible anymore, server returns status code 504

When does it happen:

  • Often: When browsing the nextcloud web-ui
  • Rarely: When using the nextcloud app

What does happen in the backend:

The processes are no longer freed and are permanently blocked (>1h).

app_1         | [16-Apr-2023 21:41:05] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 84 total children
app_1         | [16-Apr-2023 21:41:06] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 90 total children
app_1         | [16-Apr-2023 21:41:07] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 96 total children
app_1         | [16-Apr-2023 21:41:08] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 102 total children
app_1         | [16-Apr-2023 21:41:09] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 108 total children
app_1         | [16-Apr-2023 21:41:10] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 114 total children

I noticed, that the request_terminate_timeout is set to 0s = disabled.

 NOTICE: 	request_terminate_timeout = 0s

When I set the request_terminate_timeout to a value, I did not experience the problem again.

So there are two questions for me:

  • Why are there processes that are not terminating?

  • Why is the request_terminate_timeout set to 0?

@SebastianRzk
Copy link
Author

Maybe this happens on apache aswell #1803

@SebastianRzk
Copy link
Author

Maybe this bug is related aswell #1886

@J0WI
Copy link
Contributor

J0WI commented Apr 20, 2023

Duplicate of #1766 and docker-library/php#1328

@rugk
Copy link
Contributor

rugk commented May 17, 2023

Given we have a lot of duplicates and a serious (DOS) bug here, what is the solution (for now) then? We're waiting for upstream docker (#1766 - which they seem reluctant to add/merge)? And why is this exactly closed as “not planned”?

Could not you reconfigure that setting in the Nextcloud docker, if it is causing problems?
Or is there any workaround we can apply for now?

@J0WI
Copy link
Contributor

J0WI commented May 25, 2023

The solution is to mount a custom FPM config into /usr/local/etc/php-fpm.d/. The config depends on the capacity of your host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants