How to set the number of worker processes?

readdeo 2 years ago

Hi!
I would like to self-host traccar for only 2 device. Traccar spawns a lot of worker processes for this workload and i'm trying to find a way to set the exact number of workers. Is that possible? I cannot find anything about this in the documentation or in the server's source code.

Thanks.

Anton Tananaev 2 years ago

You should disable ports that you don't use. Check the configuration documentation.

readdeo 2 years ago

Yes, I tried that already with docker and with an installed version also. The number of processes didn't change at all.
I added these lines to the default config:

 <entry key='protocols.enable'>osmand</entry>
 <entry key='osmand.port'>5055</entry>

As I understood your comment and the documentation, this is what was needed to disable ports.
Am I doing something wrong?

Anton Tananaev 2 years ago

This looks correct. Why are you worried about number of threads?

readdeo 2 years ago

I was using It with docker and it is using around 3 gb ram at start and after a day, it grows around 6gb. My server has only 16gb ram, so that's too much for threads I'm not using at all. I think I'm staying with the installed version, it is stable around 4-500mb ram usage.

Anton Tananaev 2 years ago

Number of threads is completely unrelated to memory usage. I don't see anything about memory in your original comment.