Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(http): times out on large repositories #428

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Conversation

aymanbagabas
Copy link
Member

@aymanbagabas aymanbagabas commented Nov 15, 2023

This was due to having a set value of Read/Write http server timeout
values, and a faulty git gzip request handler. The server drops the
connection if there isn't any read/write within 10 seconds.

Replace the read/write timeouts with idle timeout which will reset the
counter to either read/write within 10 seconds. Idle timeout is only
used when keep-alive is enabled. That is the case by default.

Fix git by properly handling gzip and buffered git service responses.

Improve git http handler logging

Fixes: #427

This was due to having a _set_ value of Read/Write http server timeout
values, and a faulty git gzip request handler. The server drops the
connection if there wasn't any read/write within 10 seconds.

Replace the read/write timeouts with idle timeout which will reset the
counter to _either_ read/write within 10 seconds. Idle timeout is only
used when keep-alive is enabled. That is the case by default.

Fix git by properly handling gzip and buffered git service responses.

Improve git http handler logging

Fixes: #427
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 3821 lines in your changes are missing coverage. Please review.

Comparison is base (050a0d1) 50.52% compared to head (ca1c164) 47.77%.
Report is 87 commits behind head on main.

Files Patch % Lines
pkg/web/git_lfs.go 25.15% 574 Missing and 27 partials ⚠️
pkg/git/lfs.go 1.98% 297 Missing ⚠️
pkg/ui/pages/repo/stash.go 0.00% 185 Missing ⚠️
pkg/backend/webhooks.go 17.82% 162 Missing and 4 partials ⚠️
pkg/ssh/cmd/webhooks.go 45.90% 156 Missing and 9 partials ⚠️
pkg/ui/pages/repo/files.go 5.00% 152 Missing ⚠️
pkg/lfs/http_client.go 5.92% 127 Missing ⚠️
pkg/ui/pages/repo/refsitem.go 5.38% 123 Missing ⚠️
pkg/backend/repo.go 40.59% 93 Missing and 27 partials ⚠️
pkg/store/database/lfs.go 22.05% 105 Missing and 1 partial ⚠️
... and 81 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #428      +/-   ##
==========================================
- Coverage   50.52%   47.77%   -2.76%     
==========================================
  Files         107      154      +47     
  Lines        8209    13064    +4855     
==========================================
+ Hits         4148     6241    +2093     
- Misses       3767     6335    +2568     
- Partials      294      488     +194     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aymanbagabas aymanbagabas merged commit e0148ca into main Nov 16, 2023
18 of 19 checks passed
@aymanbagabas aymanbagabas deleted the http-timeout branch November 16, 2023 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clone via HTTP fails
1 participant