okfn / docker-ckan

Docker images and Docker Compose setup for CKAN [Not Maintained]
GNU Affero General Public License v3.0
81 stars 88 forks source link

uWSGI harakiri uploading large files #95

Open FedericOldani opened 2 years ago

FedericOldani commented 2 years ago

Good morning, I am running ckan with docker and exposing it under nginx. I have problems in uploading files that take more than 60sec to be uploaded.

Following the nginx settings:

       client_max_body_size    2000M;
       uwsgi_read_timeout 360s;
       uwsgi_send_timeout 360s;
       proxy_read_timeout 360s;
       proxy_send_timeout 360s;
       include     uwsgi_params;
       proxy_set_header Host $http_host;
       proxy_set_header X-Real-IP $remote_addr;

The logs when uwsgi starts:

ckan_1   | detected max file descriptor number: 1048576
ckan_1   | lock engine: pthread robust mutexes
ckan_1   | thunder lock: disabled (you can enable it with --thunder-lock)
ckan_1   | uWSGI http bound on 0.0.0.0:5000 fd 3
ckan_1   | uwsgi socket 0 bound to UNIX address /tmp/uwsgi.sock fd 6
ckan_1   | Python version: 3.8.10 (default, May  6 2021, 00:05:59)  [GCC 10.2.1 20201203]
ckan_1   | Python main interpreter initialized at 0x7f6f8f35d060
ckan_1   | python threads support enabled
ckan_1   | your server socket listen backlog is limited to 100 connections
**ckan_1   | your mercy for graceful operations on workers is 60 seconds**

Even setting the variable UWSGI_HARAKIRI=5000 the connection is killed after 60seconds. I am using the ckan image 2.9 from docker hub.

Are some settings missing?

ondics commented 1 year ago

The UWSGI_HARAKIRI settings works with us using only uwsgi as web server behind a Traefik proxy server.

Thanks for pointing out this timing problem. We also use the ckan image 2.9 from docker hub.