Add throttling to /share/img endpoint.

See: https://github.com/navidrome/navidrome/issues/2130#issuecomment-1414152343
This commit is contained in:
Deluan 2023-02-02 13:59:04 -05:00
parent 9b81aa4403
commit bcab3cc0f9
2 changed files with 10 additions and 2 deletions

View file

@ -288,7 +288,7 @@ func init() {
viper.SetDefault("devenablebufferedscrobble", true)
viper.SetDefault("devsidebarplaylists", true)
viper.SetDefault("devshowartistpage", true)
viper.SetDefault("devartworkmaxrequests", number.Max(2, runtime.NumCPU()))
viper.SetDefault("devartworkmaxrequests", number.Max(2, runtime.NumCPU()/3))
viper.SetDefault("devartworkthrottlebackloglimit", consts.RequestThrottleBacklogLimit)
viper.SetDefault("devartworkthrottlebacklogtimeout", consts.RequestThrottleBacklogTimeout)
}