R
Railway11mo ago
smaig

Ktor server uses a lot of memory

My ktor server uses a lot of memory , I do not know how it should be or I have problems with the code . Did the ktor server fail how much memory does it consume for you ?
No description
53 Replies
Percy
Percy11mo ago
Project ID: N/A
Fragly
Fragly11mo ago
That is a lot of memory 👀 What does your ktor server do?
Medim
Medim11mo ago
Your KTOR is using what engine? JVM?
Brody
Brody11mo ago
there's also the chance ktor is starting far too many worker processes try to set fixed group sizes like in this example https://ktor.io/docs/configuration-code.html#embedded-engine
smaig
smaig11mo ago
Yes It 's a small messenger , but I 'm developing it , there aren 't even any users there yet Is it important? , there 's just another Kotlin SDK there , but I can 't build a project through it
Medim
Medim11mo ago
Maybe u can manipulate jvm arguments to lower the max and minimum ram it uses, just my thought tho, since its a consistent usage
smaig
smaig11mo ago
My server is simple, folders in which there are files in which various routes are recorded, receive here, send here and everything uses the database database.
smaig
smaig11mo ago
No description
smaig
smaig11mo ago
No description
smaig
smaig11mo ago
There are many different routes in the program , and I call them in the main function
Brody
Brody11mo ago
^
smaig
smaig11mo ago
This did not help the server for some reason still uses a large amount of memory @Brody
No description
No description
Adam
Adam11mo ago
look into lowering the max amount of ram it can use
Adam
Adam11mo ago
Stack Overflow
What are the -Xms and -Xmx parameters when starting JVM?
Please explain the use of the Xms and Xmx parameters in JVMs. What are the default values for them?
Adam
Adam11mo ago
I believe 2gb is the default, so your usage makes sense
Want results from more Discord servers?
Add your server