Galaxy

From Leo's Notes
Last edited on 30 December 2021, at 00:59.

Galaxy is an open source web platform for accessing and manipulating research data.

Troubleshooting[edit | edit source]

Timeouts after 60 seconds[edit | edit source]

Long running HTTP requests time out after 60 seconds. This is evident by looking at HTTP requests made by the browser where pending requests timeout after exactly 1 minute. This is a problem for requests that are long running such generating a .zip file when a user wants to multiple files. As stated in their documentation:

By default, uWSGI will wait up to 60 seconds for web workers and mules to terminate.
—Galaxy Project 19.09 Admin Documentation, https://docs.galaxyproject.org/en/release_19.09/admin/scaling.html

The documentation doesn't explain how to change this default and there doesn't appear to be any way to change it based on the existing documentation. After some trial and error, the 60 seconds only appear to take effect on the http listener. As a workaround, you can make a separate uWSGI socket and have nginx proxy that instead of the uWSGI http listener. To do so:

  1. Edit config/galaxy.yml and add under the uwsgi the socket and harakiri (not sure if this is needed...) values:
    uwsgi:
      socket: 0.0.0.0:8070
      harakiri: 300
    
    Restart the galaxy service to apply.
  2. If using Nginx as a proxy, replace the proxy configs with:
    uwsgi_pass galaxy-dev:8070;
    include uwsgi_params;
    uwsgi_param REMOTE_USER $remote_user;
    uwsgi_param X-Forwarded-Host $host; uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
    uwsgi_read_timeout 1800;
    uwsgi_send_timeout 1800;
    
    Reload Nginx to apply. (Eg. /usr/local/nginx/sbin/nginx -s reload).