You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules
zeripath f034804e5d
Set self-adjusting deadline for connection writing (#16068) (#16123)
In #16055 it appears that the simple 5s deadline doesn't work for large
file writes. Now we can't - or at least shouldn't just set no deadline
as go will happily let these connections block indefinitely. However,
what seems reasonable is to set some minimum rate we expect for writing.

This PR suggests the following algorithm:

* Every write has a minimum timeout of 5s (adjustable at compile time.)
* If there has been a previous write - then consider its previous
deadline, add half of the minimum timeout + 2s per kb about to written.
* If that new deadline is after the minimum timeout use that.

Fix #16055

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
4 years ago
..
analyze Speed up `enry.IsVendor` (#15213) (#15245) 4 years ago
auth Add SameSite setting for cookies (#14900) 4 years ago
avatar Avatars and Repo avatars support storing in minio (#12516) 4 years ago
base fix truncate utf8 string (#15828) (#15854) 4 years ago
cache [Vendor] Update go-redis to v8.5.0 (#13749) 4 years ago
charset Ensure that the detected charset order is set in chardet test (#12574) 5 years ago
context Stop calling WriteHeader in Write (#15862) (#15873) 4 years ago
convert [API] pull notification subject status: add "merged" (#15344) (#15654) 4 years ago
cron Cron job to cleanup hook_task table (#13080) 4 years ago
doctor Add err to log (#15813) (#15824) 4 years ago
emoji Fix several render issues (#14986) 4 years ago
eventsource Migrate to use jsoniter instead of encoding/json (#14841) 4 years ago
forms Restore PAM user autocreation functionality (#15825) (#15867) 4 years ago
generate Add gitea-vet (#10948) 5 years ago
git git migration: don't prompt interactively for clone credentials (#15902) (#16082) 4 years ago
gitgraph Fix bug on commit graph (#15517) (#15530) 4 years ago
graceful Set self-adjusting deadline for connection writing (#16068) (#16123) 4 years ago
hcaptcha hCaptcha Support (#12594) 4 years ago
highlight Use existing analyzer module for language detection for highlighting (#13522) 4 years ago
httpcache Add ETag header (#15370) (#15552) 4 years ago
httplib fix webhook timeout bug (#15613) (#15621) 4 years ago
indexer If the default branch is not present do not report error on stats indexing (follow-up of #15546) (#15583) (#15594) 4 years ago
lfs Close file on invalid range (Addition to #15166) (#15268) (#15308) 4 years ago
log Migrate to use jsoniter instead of encoding/json (#14841) 4 years ago
markup Fix data URI scramble (#16098) (#16118) 4 years ago
matchlist Add Allow-/Block-List for Migrate & Mirrors (#13610) 4 years ago
metrics Prometheus endpoint (#5256) 6 years ago
migrations GitHub: migrate draft releases too (#15884) (#15888) 4 years ago
nosql Fix setting redis db path (#15698) (#15708) 4 years ago
notification Don't manipulate input params in email notification (#16011) (#16033) 4 years ago
options Add StatDir and replace com.StatDir (#14099) 4 years ago
password Check passwords against HaveIBeenPwned (#12716) 4 years ago
pprof Add golangci (#6418) 6 years ago
private Move restore repo to internal router and invoke from command to avoid open the same db file or queues files (#15790) (#15816) 4 years ago
process Reduce data races (#14549) 4 years ago
public Add ETag header (#15370) (#15552) 4 years ago
queue Queue manager FlushAll can loop rapidly - add delay (#15733) (#15840) 4 years ago
recaptcha Migrate to use jsoniter instead of encoding/json (#14841) 4 years ago
references Add mentionable teams to tributeValues and change team mention rules to gh's style (#13198) 4 years ago
repofiles Remove possible resource leak (#15067) (#15082) 4 years ago
repository Set GIT_DIR correctly if it is not set (#15751) (#15769) 4 years ago
secret Attachments: Add extension support, allow all types for releases (#12465) 4 years ago
session Migrate to use jsoniter instead of encoding/json (#14841) 4 years ago
setting Set self-adjusting deadline for connection writing (#16068) (#16123) 4 years ago
ssh Set self-adjusting deadline for connection writing (#16068) (#16123) 4 years ago
storage Add size to Save function (#15264) (#15270) 4 years ago
structs Make manual merge autodetection optional and add manual merge as merge method (#12543) 4 years ago
svg Fix filepath basename on Windows for SVG bindata (#12241) 5 years ago
sync Fix missing unlock in uniquequeue (#9790) 5 years ago
task Migrate to use jsoniter instead of encoding/json (#14841) 4 years ago
templates Prevent incorrect HTML escaping in swagger.json (#14957) 4 years ago
test Move middlewares to web/middleware (#14480) 4 years ago
timeutil Fix display since time round (#14226) 4 years ago
translation Use index of the supported tags to choose user lang (#15452) (#15488) 4 years ago
upload Update golangci-lint to version 1.31.0 (#13102) 4 years ago
uri Dump github/gitlab/gitea repository data to a local directory and restore to gitea (#12244) 4 years ago
user Add gitea-vet (#10948) 5 years ago
util [API] Add pagination to ListBranches (#14524) 4 years ago
validation Move macaron to chi (#14293) 4 years ago
web Fix setting of SameSite on cookies (#15989) (#15991) 4 years ago