Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

470
Vistas
Change to pm = static on php-fpm docker image

I'm trying to change this value in fpm configuration of PHP.

Here, you can see my simple docker-compose file:

version: '3.6'
services:

  wordpress:
    image: wordpress:${WORDPRESS_VERSION:-php7.3-fpm}
    container_name: ${WORDPRESS_CONTAINER:-wordpress}
    volumes:
      - ./php/pool.d:/usr/local/etc/php-fpm.d
    environment:
      - WORDPRESS_DB_NAME=${WORDPRESS_DB_NAME:-wordpress}
      - WORDPRESS_TABLE_PREFIX=${WORDPRESS_TABLE_PREFIX:-wp_}
      - WORDPRESS_DB_HOST=${WORDPRESS_DB_HOST:-mysql}
      - WORDPRESS_DB_USER=${WORDPRESS_DB_USER:-root}
      - WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-password}
    depends_on:
      - mysql
    restart: always
...

Inside ./php/pool.d/my-www.conf I have only:

pm = static
pm.max_children = 10

And I get the error:

ERROR: [/usr/local/etc/php-fpm.d/my-www.conf:2] unknown entry 'pm'

If I include the wwwpool namespace:

[www]
pm = static
pm.max_children = 10

And I get the error:

ALERT: [pool www] user has not been defined

Any ideas?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

actually, when you mount a directory to the inside of the docker-image (like something you did ./php/pool.d:/usr/local/etc/php-fpm.d)

version: '3.6'
services:

  wordpress:
    ...
    volumes:
      - ./php/pool.d:/usr/local/etc/php-fpm.d
    ...

you replaced it. thus, you have no configuration of the pool except a little part of it that is something like this

pm = static
pm.max_children = 10

therefore, you get the errors. to solve this trouble I can propose two ways:

  • you can pass a complete pool configuration file to the inside of the docker-image and change anything you want in the new config file then change the docker-compose file from this
version: '3.6'
services:

  wordpress:
    ...
    volumes:
      - ./php/pool.d:/usr/local/etc/php-fpm.d
    ...

to this

version: '3.6'
services:

  wordpress:
    ...
    volumes:
      - ./php/pool.d/www.conf:/usr/local/etc/php-fpm.d/www.conf
    ...
  • you can overwrite a part of the pool configuration by passing your new config value as a second config file to the pool directory to the inside of the docker-image. but, you must care about the file name. for example, usually, the default pool configuration file's name is www.conf so, to overwrite its configs, you must create a file with name www2.conf to load after the www.conf file (for more information see this issue: https://serverfault.com/a/806530/529531). also, your docker-compose file will be something like this
version: '3.6'
services:

  wordpress:
    ...
    volumes:
      - ./php/pool.d/www2.conf:/usr/local/etc/php-fpm.d/www2.conf
    ...
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda