0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-30 13:04:37 +01:00
gitea/docs/content/doc/advanced
zeripath daa5a23548
Set self-adjusting deadline for connection writing (#16068)
* Set self-adjusting deadline for connection writing

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

* Linearly increase timeout

* Make PerWriteTimeout, PerWritePerKbTimeouts configurable

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

Co-authored-by: 6543 <6543@obermui.de>
2021-06-11 00:25:25 +03:00
..
adding-legal-pages.en-us.md
clone-filter.en-us.md [Docs] Clone filters (#14555) 2021-02-03 10:11:20 -05:00
cmd-embedded.en-us.md
config-cheat-sheet.en-us.md Set self-adjusting deadline for connection writing (#16068) 2021-06-11 00:25:25 +03:00
config-cheat-sheet.zh-cn.md add note about `cron.SCHEDULE` format in document (#15812) 2021-05-10 12:54:45 -04:00
customizing-gitea.en-us.md Improve logo customization docs (#15754) 2021-05-07 02:32:29 -04:00
customizing-gitea.zh-cn.md
environment-variables.en-us.md
environment-variables.zh-cn.md
external-renderers.en-us.md Use a generic markup class to display externally rendered files and diffs (#15735) 2021-05-07 10:43:41 +02:00
hacking-on-gitea.zh-cn.md
logging-documentation.en-us.md Add information on how to rotate logging from outside container (#15852) 2021-05-14 00:36:23 -04:00
mail-templates-us.md Fix documentation for the fallback mail subject (#15223) 2021-03-31 11:36:21 -04:00
make.fr-fr.md
make.zh-cn.md
repo-indexer.en-us.md
search-engines-indexation.en-us.md
signing.en-us.md Specify relation between multiple signing options (#15496) 2021-04-15 18:06:32 +02:00
third-party-tools.zh-cn.md