From ccc3ca09484e25f5b468ec191efd5552997e9055 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 5 Aug 2025 20:34:47 +0200 Subject: [PATCH] :sparkles: Disable virtual threads on http server --- backend/src/app/http.clj | 5 +++-- backend/src/app/main.clj | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/app/http.clj b/backend/src/app/http.clj index 328c2e5612..5a52146ff0 100644 --- a/backend/src/app/http.clj +++ b/backend/src/app/http.clj @@ -25,6 +25,7 @@ [app.rpc :as-alias rpc] [app.rpc.doc :as-alias rpc.doc] [app.setup :as-alias setup] + [app.worker :as wrk] [integrant.core :as ig] [promesa.exec :as px] [reitit.core :as r] @@ -63,7 +64,7 @@ (assert (sm/check schema:server-params params))) (defmethod ig/init-key ::server - [_ {:keys [::handler ::router ::host ::port] :as cfg}] + [_ {:keys [::handler ::router ::host ::port ::wrk/executor] :as cfg}] (l/info :hint "starting http server" :port port :host host) (let [options {:http/port port :http/host host @@ -72,7 +73,7 @@ :xnio/direct-buffers false :xnio/io-threads (or (::io-threads cfg) (max 3 (px/get-available-processors))) - :xnio/dispatch :virtual + :xnio/dispatch executor :ring/compat :ring2 :socket/backlog 4069} diff --git a/backend/src/app/main.clj b/backend/src/app/main.clj index c51d85f6ad..544b530b4d 100644 --- a/backend/src/app/main.clj +++ b/backend/src/app/main.clj @@ -231,7 +231,8 @@ ::http/router (ig/ref ::http/router) ::http/io-threads (cf/get :http-server-io-threads) ::http/max-body-size (cf/get :http-server-max-body-size) - ::http/max-multipart-body-size (cf/get :http-server-max-multipart-body-size)} + ::http/max-multipart-body-size (cf/get :http-server-max-multipart-body-size) + ::wrk/executor (ig/ref ::wrk/executor)} ::ldap/provider {:host (cf/get :ldap-host)