Skip to content

Commit

Permalink
GH-2021 Disable Loom before initializing the web thread pool (Fix #2021)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzikoysk committed Jan 10, 2024
1 parent 2cc96d9 commit fb0e79f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class HttpServer {
val extensionsManagement = reposilite.extensions
val localConfiguration = extensionsManagement.facade<LocalConfiguration>()

// Loom is enabled by default in Javalin 5.x & it's unstable on prd
ConcurrencyUtil.useLoom = false

val webThreadPool = ConcurrencyUtil.jettyThreadPool(
name = "Reposilite | Web (${localConfiguration.webThreadPool.get()}) -",
minThreads = localConfiguration.webThreadPool.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ internal object JavalinConfiguration {
}

private fun configureJavalin(config: JavalinConfig, localConfiguration: LocalConfiguration, webSettings: Reference<WebSettings>) {
ConcurrencyUtil.useLoom = false
config.showJavalinBanner = false
config.http.asyncTimeout = 10.minutes.inWholeMilliseconds
config.contextResolver.ip = { it.header(webSettings.get().forwardedIp) ?: it.req().remoteAddr }
Expand Down

0 comments on commit fb0e79f

Please sign in to comment.