#1 2018-03-06 10:08:26

ImproSnake
Member
Registered: 2017-06-20
Posts: 30

Connection Properties in Services

Hello all,

i don't know if i do something wrong in the following Scenario.

I connect with a Webclient and authenticate successfull at the mormot server.

Now i can use Interface Based Services. But how to use the Connection Properties to the db the mormot way in the service?

I use the global variable of the defined Connection properties and this works well but now i get a lot of sleeping proccess in my database. They will disappear after the mormot server stops running, but they remain the whole time the server run's. If i use the procedure EndCurrentThread after each execution the Threads in the database are gone. Is this the right way to use or ?

Maybe someone of you can point me in the right direction.

If you need further Information please ask.

Thank you for all of your help

Offline

#2 2018-03-06 21:37:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: Connection Properties in Services

Depending on the connection type, most of the time there will be one connection maintained by thread.
With the default HTTP server, it uses a thread pool of 32 threads by default.
The threads are not "gone", they are reused when needed.
So you may see 32 connections, with prepared statements ready to be reused.

On production, it will give you the best performance.
If 32 is too much, lower down the thread count when creating the HTTP server.

Offline

Board footer

Powered by FluxBB