J
J
Julia Kovalenko2018-05-11 15:21:30
Nginx
Julia Kovalenko, 2018-05-11 15:21:30

Nginx 429 error code?

Hello!
Wrote an app. Runs on nginx.
Here is his config:

server {
    charset utf-8;
    client_max_body_size 128M;

    listen 80;

    server_name $BASE_HOST $API_HOST;
    root        /app/src/public;
    index       index.php;

    access_log  /var/log/nginx/access.log;
    error_log   /var/log/nginx/error.log;

    location / {
        try_files \$uri \$uri/ /index.php?\$args;
    }

    location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
        try_files \$uri =404;
    }

    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME \$document_root/\$fastcgi_script_name;
        fastcgi_param PHP_VALUE "upload_max_filesize=5632K \n post_max_size=5632K";
        fastcgi_pass   php-container:9000;
        fastcgi_read_timeout 300;
        try_files \$uri =404;
    }

    location ~ /\.(ht|svn|git) {
        deny all;
    }
}

The config is standard, in general.
Those who have started using my application tell me that often the error 429 too many connections. They are said to be accessing the service in multi-threaded mode.
But there are no restrictions on connections. Where is 429 from?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
Julia Kovalenko, 2018-05-11
@kovalenko_jul_s

php-fpm threw 429

K
ky0, 2018-05-11
@ky0

It is unlikely that nginx gives it away, most likely the application.

A
Alexander Karabanov, 2018-05-11
@karabanov

Try adding/changing to /etc/nginx/nginx.conf

worker_processes  auto;

worker_rlimit_nofile 16384;

events {
    worker_connections  8192;
    use epoll;
    multi_accept on;
}

Just read the documentation for what these directives are.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question