Request timeout issue on production server

I am using erpnext dockerized production setup

For long processing task, I get request timeout error and page un responsive error.
I want to run the process how long it take even for 10 min, should not site get hanged.
Any solution for this,

I tried with increasing a timeout,

bench config http_timeout 6000

On nginx

location @webserver {
                proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Frappe-Site-Name $host;
                proxy_set_header Host $host;
                proxy_set_header X-Use-X-Accel-Redirect True;
                proxy_connect_timeout 800;
        proxy_send_timeout 800;
        proxy_read_timeout 800;
        send_timeout 800;
                proxy_redirect off;

                proxy_pass  http://backend-server;
        }

        # optimizations
        sendfile on;
        keepalive_timeout 60;
        client_max_body_size 100m;
        client_body_buffer_size 128k;
        client_header_buffer_size 16k;

Set it using Environment Variable

HI @revant_one ,
Thankyou for you reply

I tried to update the above configuration with /home/ubuntu/frappe_docker/resources/nginx-template.conf

It’s get reflect in nginx file inside container too.
But the timeout function is not working

Try scaling your gunicorn/backend service to more replicas

I already tried scaling the backend docker container with 5 and 3 as well

Still I don’t see any performance improved on it. I face the same issue.

Is your db in container? If so optimize the options e.g. innodb_buffer_pool_size, search forum for db optimization.

For advance understanding of what is happening:

1 Like

Thanks, I will check that