Fix LFS timeouts when trying to save large files
The following was happening:
- Workhorse stores an LFS file in /var/opt/gitlab/gitlab-rails/shared/lfs-objects/tmp/uploads
- CarrierWave then renames the file to a temporary directory (e.g. /opt/gitlab/embedded/service/gitlab-rails/tmp)
- 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)
Merge request reports
Activity
assigned to @ayufan
mentioned in issue #33218 (closed)
@stanhu Since we do overwrite Carrierwave specific behavior, should we have test for that?
@ayufan Done.
assigned to @stanhu
added 231 commits
-
66e91150...5cb8ad6c - 228 commits from branch
master
- 3613999f - Fix LFS timeouts when trying to save large files
- e7d13e56 - Add spec for LFS uploader
- 425173e8 - Fix LFS spec by reloading object
Toggle commit list-
66e91150...5cb8ad6c - 228 commits from branch
assigned to @ayufan
I wonder if we should apply that fix also for all other uploaders. @stanhu What do you think?
assigned to @stanhu
@ayufan I think we should indeed.
added 1 commit
- ec5955e4 - Fix LFS timeouts when trying to save large files
added 1 commit
- 7bdd0bdc - Fix LFS timeouts when trying to save large files
mentioned in issue #33274 (closed)
@ayufan I created gitlab-org/gitlab-ce#33274 to address this issue for all other uploaders.
assigned to @rymai
mentioned in issue omnibus-gitlab#2380 (closed)
added 1 commit
- 0e9d3e37 - Fix LFS timeouts when trying to save large files
added 1 commit
- cc220426 - Fix LFS timeouts when trying to save large files
added 1 commit
- 2f0fb044 - Fix LFS timeouts when trying to save large files
added 104 commits
-
2f0fb044...39340e42 - 103 commits from branch
master
- 37dd0737 - Fix LFS timeouts when trying to save large files
-
2f0fb044...39340e42 - 103 commits from branch
mentioned in commit 02e66f59
mentioned in merge request !11905 (merged)
mentioned in commit 30e5207d
assigned to @ayufan
mentioned in commit 761e3764
mentioned in commit aec67a0f
mentioned in commit 6b404eed
mentioned in commit e19757a0
mentioned in commit 5b37dd7c
mentioned in commit 8a417f5a
mentioned in issue #33402 (closed)
mentioned in issue #33450 (closed)
Picked into
9-2-stable
; will go intov9.2.6
.mentioned in commit da1ed066
mentioned in issue #31871 (closed)
mentioned in issue #33585 (closed)
mentioned in commit ec7b62cf