1#1: pread() "/etc/nginx/conf.d/default.conf" failed (38: Function not implemented)

Viewed 1239

It's been several times that while coding, my "Docker Container" crashes. Looking at the logs, here is what it shows me:

[crit] 1#1: pread() "/etc/nginx/conf.d/default.conf" failed (38: Function not implemented)

Here is the Docker-compose config, and the default.conf of nginx :

docker-compose.yml:

version:  '3.7'
services:
    mariadb:
        image: ${MARIADB_VERSION}
        restart: on-failure
        environment:
            MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
            MYSQL_DATABASE: ${MYSQL_DATABASE}
            MYSQL_USER: ${MYSQL_USER}
            MYSQL_PASSWORD: ${MYSQL_PASSWORD}
        ports:
            - ${PORTS_MARIADB}
        volumes:
            - sql-data:/var/lib/mysql
        #user: 1000:1000
    php:
        build:
            context: .
            dockerfile: docker/php/Dockerfile
        volumes:
            - './app/:/usr/src/app'
        restart: on-failure
        user: 1000:1000
        environment:
            APP_ENV: dev
            APP_DEBUG: 1
            SECRET: ddezde2z3dea12da21azd23adz1
            DB_USER: ff
            DB_PWD: fezfezfezfezfze
            DB_NAME: ff
            DB_VER: mariadb-10.4.12
            DB_PORT: 3306
    nginx:
        image: ${NGINX_VERSION}
        restart: on-failure
        volumes:
            - './app/public/:/usr/src/app' 
            - './docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro'
        ports:
            - ${PORTS_NGINX}
        depends_on:
            - php
volumes:
  sql-data:

default.conf (nginx):

    server {
    server_name ~.*;

    location / {
        root /usr/src/app;

        # try to serve file directly, fallback to index.php
        try_files $uri /index.php$is_args$args;
    }

    # optionally disable falling back to PHP script for the asset directories;
    # nginx will return a 404 error when files are not found instead of passing the
    # request to Symfony (improves performance but Symfony's 404 page is not displayed)
    # location /bundles {
    #     try_files $uri =404;
    # }

    location ~ ^/index\.php(/|$) {
         client_max_body_size 50m;

         fastcgi_pass php:9000;
         fastcgi_buffers 16 16k;
         fastcgi_buffer_size 32k;
         include fastcgi_params;
         fastcgi_param SCRIPT_FILENAME /usr/src/app/public/index.php;
    }

    # return 404 for all other php files not matching the front controller
    # this prevents access to other php files you don't want to be accessible.
    location ~ \.php$ {
        return 404;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}

I don't know why I've got this and.. I need to restart docker to get the container work again.

Any idea ? Regards

1 Answers

If you're on Docker for Windows, especially the latest "stable" (2.3.0.3) like I was, you could try using the Edge version of Docker Desktop as suggested here by stephen-turner. Or you could downgrade like diogoaguiar suggests.

Related