mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Raising socket limit again, should be neligible for performance.
We need people getting Gbit/s traffic to see if this works :hmm:
This commit is contained in:
parent
69151d058f
commit
3706bdaee8
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- [2020-06-12] Added CHANGELOG.md by [@lflare].
|
- [2020-06-12] Added CHANGELOG.md by [@lflare].
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- [2020-06-12] Raised ApacheClient socket limit to `2**18` by [@lflare].
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ import javax.crypto.CipherOutputStream
|
||||||
import javax.crypto.spec.SecretKeySpec
|
import javax.crypto.spec.SecretKeySpec
|
||||||
|
|
||||||
private val LOGGER = LoggerFactory.getLogger("Application")
|
private val LOGGER = LoggerFactory.getLogger("Application")
|
||||||
|
private val THREADS_TO_ALLOCATE = 2**18 // Honestly, no reason to not just let 'er rip. Inactive connections will expire on their own :D
|
||||||
|
|
||||||
fun getServer(cache: DiskLruCache, serverSettings: ServerSettings, clientSettings: ClientSettings, statistics: AtomicReference<Statistics>): Http4kServer {
|
fun getServer(cache: DiskLruCache, serverSettings: ServerSettings, clientSettings: ClientSettings, statistics: AtomicReference<Statistics>): Http4kServer {
|
||||||
val executor = Executors.newCachedThreadPool()
|
val executor = Executors.newCachedThreadPool()
|
||||||
|
@ -54,8 +55,8 @@ fun getServer(cache: DiskLruCache, serverSettings: ServerSettings, clientSetting
|
||||||
.setSocketTimeout(3000)
|
.setSocketTimeout(3000)
|
||||||
.setConnectionRequestTimeout(3000)
|
.setConnectionRequestTimeout(3000)
|
||||||
.build())
|
.build())
|
||||||
.setMaxConnTotal(65535)
|
.setMaxConnTotal(THREADS_TO_ALLOCATE)
|
||||||
.setMaxConnPerRoute(65535)
|
.setMaxConnPerRoute(THREADS_TO_ALLOCATE)
|
||||||
// Have it at the maximum open sockets a user can have in most modern OSes. No reason to limit this, just limit it at the Netty side.
|
// Have it at the maximum open sockets a user can have in most modern OSes. No reason to limit this, just limit it at the Netty side.
|
||||||
.build())
|
.build())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue