Closed janpfischer closed 3 months ago
Hi !!
You can change THREAD value in the container file store: put 8 instead of 4. The file is : /server/Json Http Server.conf
Strange, this is already set to "4". I did not change that.
debug-mtgcompanion-data:/data/config/server# cat Json\ Http\ Server.conf
#
#Fri Mar 29 11:09:28 UTC 2024
AUTOSTART=false
Access-Control-Allow-Headers=Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin
Access-Control-Allow-Origin=*
Access-Control-Request-Method=GET,PUT,POST,DELETE,OPTIONS
BLOCKED_IPS=
ENABLE_GZIP=true
ENABLE_SSL=false
INDEX_ROUTES=true
JWT_EXPIRATION_MINUTES=60
JWT_REFRESH_EXPIRATION_MINUTES=21600
JWT_SECRET=changed
KEYSTORE_PASS=changeit
KEYSTORE_URI=/.magicDeskCompanion/data/jetty.jks
PRETTY_PRINT=false
SERVER-PORT=8080
THREADS=4
TIMEOUT_CACHE_MINUTES=720
Update: The overall server crash loop is fixed, that was a configuration error on my side. I've updated the initial Issue report.
The default value is setup by MTGCompanion with the Runtime.availableProcessors() function of java.
Update: The overall server crash loop is fixed, that was a configuration error on my side. I've updated the initial Issue report. Is it OK now or the crash persist ?
The application crash is fixed, but the problem with starting the JSON Server is still there. It still tries with 8 threads.
Maybe the default value is correctly set with Runtime.availableProcessors()
but the Jetty server does not read this setting at startup? Would explain why the file reads 4 but the startup log says that "min threads" is 8.
Strange, this is already set to "4". I did not change that
The THREAD parameter is for MAX thread value ;)
Then you should set 8 to the value and not 4
Okay, understood. Changed it and the server started. Thanks!
But wouldn't it make sense if the minThreads Parameter would be adjusted if maxThreads < minThreads? Espacially if the initial value is set with Runtime.availableProcessors()
. Because as of now I had to set the maxThreads to more Threads that I have on the machine.
I believe minThreads 8 is the Jetty default. So would be good if it is automatically adjusted and/or can be set in the configuration.
Yup, i'm working on it ;)
Awesome, thank you!
Describe the bug Hi, I am trying to run the WebUI Docker container in my kubernetes cluster. The application starts and I can access the webui. But I can't access the JSON server.
At the end of the start up the app logs this error:
I believe that this error leads to the unavailability of the JSON server. My server is not the strongest and has not more than 4 threads. I believe the minThreads Jetty setting of 8 is the default. Is there a way to configure this to 4?
Thank you very much!