Implement caching & limit concurrency

This commit is contained in:
Moritz Marquardt 2021-03-19 20:58:53 +01:00
parent 8ead10c82e
commit 203e230905
No known key found for this signature in database
GPG key ID: D5788327BEE388B6
4 changed files with 62 additions and 49 deletions

View file

@ -99,6 +99,8 @@ func main() {
NoDefaultServerHeader: true,
NoDefaultDate: true,
ReadTimeout: 10 * time.Second,
Concurrency: 1024 * 32, // TODO: adjust bottlenecks for best performance with Gitea!
MaxConnsPerIP: 100,
}).Serve(listener)
if err != nil {
fmt.Printf("Couldn't start server: %s\n", err)