1

I am getting timeout while uploading large files in GeoNode ( System Configuration : GeoNode 3.1.0 , GeoServer 2.16.2 installed on Ubuntu 18.04. ).

I tried compressing large files to decrease their size (E.g. gdal_translate -of GTiff -co "COMPRESS=DEFLATE" -co "PREDICTOR=2" uncompressed.tiff compressed.tiff ), this helped for some cases only. But I have other files which are still large.

So I wish to increase the timeout. But, I could not find some exact reference which can guide me to increase the timeout for this scenario. While exploring geonode/geoserver settings, I found different timeout settings and tried to increase timeout period in different settings as follows:

  1. Timeout increased in /etc/nginx/nginx.conf

    • keepalive_timeout increased to 300 from 65
  2. Timeout increased in GeoNode UWSGI config (/etc/uwsgi/apps-enabled/geonode.ini)

    • env = OGC_REQUEST_TIMEOUT increaded to 600 from 60.

    • harakiri increased to 600 from 300

Still timeout occurs while uploading large files. Is there some settings I am missing?

1
  1. If you are using http-socket on your geonode.ini, try adding the following parameters to the NGINX location
  proxy_connect_timeout       600;
  proxy_send_timeout          600;
  proxy_read_timeout          600;
  send_timeout                600;
  proxy_redirect              off;
  proxy_set_header            Host $host;
  proxy_set_header            X-Real-IP $remote_addr;
  proxy_set_header            X-Forwarded-Host $server_name;
  proxy_set_header            X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header            X-Forwarded-Proto $scheme;

  proxy_pass http://$upstream;
  1. Try updating the geonode.ini as follows
env = OGC_REQUEST_TIMEOUT=30
env = OGC_REQUEST_MAX_RETRIES=1
env = OGC_REQUEST_BACKOFF_FACTOR=0.3
env = OGC_REQUEST_POOL_MAXSIZE=10
env = OGC_REQUEST_POOL_CONNECTIONS=10
env = GEONODE_DB_CONN_MAX_AGE=0
env = GEONODE_DB_CONN_TOUT=5

If are still having problems, you could try to revise the cheaper on geonode.ini parameters in the case you are using them, as an instance, try tweaking the follwoing params:

max-requests = 1000                  ; Restart workers after this many requests
max-worker-lifetime = 3600           ; Restart workers after this many seconds
reload-on-rss = 2048                 ; Restart workers after this much resident memory
worker-reload-mercy = 60             ; How long to wait before forcefully killing workers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.