Skip to content
Snippets Groups Projects

Fix LFS timeouts when trying to save large files

Merged Stan Hu requested to merge sh-fix-lfs-from-moving-across-filesystems into master

The following was happening:

  1. Workhorse stores an LFS file in /var/opt/gitlab/gitlab-rails/shared/lfs-objects/tmp/uploads
  2. CarrierWave then renames the file to a temporary directory (e.g. /opt/gitlab/embedded/service/gitlab-rails/tmp)
  3. CarrierWave then renames the file to its final location (e.g. /var/opt/gitlab/gitlab-rails/shared/lfs-objects)

When the LFS upload path was on a different filesystem than the Rails installation, step 2 could take a longer than 10 seconds, at which point Workhorse would time out with "badgateway: failed after 10s: context canceled".

This change makes the work path the same root as the LFS storage path, preventing moves across filesystems.

Closes #33218 (closed)

Edited by Stan Hu

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading