Comments (3)
This issue seems like it might be deeper in the NGINX configuration, correct?
I am providing the defaults of NGINX and the steps to reproduce are pretty vague -- especially for people who don't run K8s everyday.
Are you aware of any NGINX directives that need to be changed?
from docker-php.
Closing for inactivity. Feel free to publish replication steps if you'd like to see this re-opened.
from docker-php.
I did write a response. But it's not here. Don't know what happened.. This is not specific to k8s.
"worker_processes auto;" won't work as you think it should inside cgroups-controlled environment (such as docker or lxc or whatelse).
nginx relies on sysconf(_SC_NPROCESSORS_ONLN) call to determine the number of available CPUs to spawn the workers accordingly. Unfortunately in cgroups this does not work and the number of CPUs is not changing whether you define a cpu subset or not.
So it's a cgroup thing, not kubernetes. "auto" will always use the number of cores available to the underlying host wether it's a VM or bare-metal, it won't use the limits set by cgroup or cgroup2.
It's harder to mimic this problem in MacOS since Docker/Podman creates a virtual machine with limited resources for the Docker/Podman container. But in a real prod environment running on Linux you should be able to replicate this issue. Doesn't need to be a k8s cluster. You can run a cheap virtual machine with 2 cores and start a docker container inside it that is limited to use 1 core, you will see two worker processes inside the running container.
from docker-php.
Related Issues (20)
- Scrollbars appear on 1x screens HOT 1
- Missing INTL module on php:beta-8.3-fpm-nginx HOT 1
- FPM-NGINX doesn't appear to be copying/executing custom entrypoint scripts HOT 1
- Add our SaaS products at the top
- LOG_LEVEL conflicts with Laravel: "Unable to create configured logger"
- Automigrations fail with Postgres
- Create a FrankenPHP variation HOT 1
- Improve release process
- Nginx realip module breaks Laravel's TrustProxies middleware HOT 2
- Search does not work
- install-php-extensions does not work HOT 3
- docker-php-serversideup-s6-ini fails HOT 1
- Laravel migration with database cache errors because cannot obtain lock HOT 1
- APACHE_DOCUMENT_ROOT is Misdocumented? /var/www/html/public instead of /var/www/html ?? HOT 1
- docker-php-serversideup-s6-init: not found HOT 1
- Add `php artisan config:clear` on Deployments
- Upstream sent too big header while reading response header from upstream
- S6 Overlay Scripts take a long time to stop HOT 1
- NGINX_WEBROOT not as documented HOT 3
- cannot run composer install in Dockerfile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-php.