Docker Community Forums

Share and learn in the Docker community.

Php-fpm SIGBUS error

Hi all,

I’m running a docker setup for a PHP application, this setup contains nginx, php-fpm:7.2, MariaDB, Redis & Redis Monitor

Unfortunately, I have a SIGBUS error in my php-fpm (7.2) docker:

[09-Jun-2020 19:06:22] WARNING: [pool www] child 71 exited on signal 7 (SIGBUS) after 2.599590 seconds from start

[09-Jun-2020 19:06:22] NOTICE: [pool www] child 74 started

This results in a 502 from Nginx.

But this happens (sometimes) after a few requests. I’m not skilled enough to understand exactly why and how this happens. So if anybody has an idea or a solution, I would be very happy!

My questions is: Is this docker related or a hardware issue, and how to fix it?

If you need more info, please let me know


W10 pro

PHP-FPM dockerfile:

FROM php:7.2-fpm

RUN apt-get update && \
  apt-get install -y \
  curl \
  git \
  gnupg \

RUN apt-get update && apt-get install -y \
	libzip-dev \
    libfreetype6-dev \
    libpq-dev \
    g++ \
    libicu-dev \
    libxml2-dev \
    libssl-dev \
    libcurl4-openssl-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install intl \
&& docker-php-ext-install zip \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install pdo_pgsql \
&& docker-php-ext-install soap \
&& apt-get purge --auto-remove -y g++ \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& docker-php-ext-install opcache \
&& docker-php-ext-install bcmath

# Install PHP Redis extension
RUN pecl install -o -f redis \
  &&  rm -rf /tmp/pear \
  &&  docker-php-ext-enable redis

COPY php.ini /usr/local/etc/php/

RUN curl -sS | php -- --install-dir=/usr/local/bin --filename=composer

COPY default.pool.conf /etc/php/7.0/fpm/pool.d/

# set composer to run as root

WORKDIR /var/www

RUN sed -i -e 's/listen.*/listen =' /usr/local/etc/php-fpm.conf

RUN usermod -u 1000 www-data

CMD ["php-fpm"]

Nginx docker file

FROM nginx:stable

COPY nginx.conf /etc/nginx/
COPY gamepoint.conf /etc/nginx/sites-available/

RUN rm /etc/nginx/conf.d/default.conf
RUN ln -s /etc/nginx/sites-available/gamepoint.conf /etc/nginx/conf.d/default.conf

RUN echo 'upstream  php-upstream { server php:9000; }' > /etc/nginx/conf.d/upstream.conf

RUN usermod -u 1000 www-data