[Mono-list] mono process - high number of threads

Chris Swiedler cswiedler at trionworlds.com
Wed Nov 23 17:10:27 UTC 2016


Those are the .Net/mono threadpool. It may be that you're leaking threadpool threads somehow, or it may be that there's enough contention that eventually you need that many threads.

Does the number of threads grow infinitely?

Try setting MONO_THREADS_PER_CPU=1 in the environment of your process.

Try running pstack on the process and see what the threads are doing.

chris

-----Original Message-----
From: Mono-list [mailto:mono-list-bounces at lists.dot.net] On Behalf Of Rubén de Alba
Sent: Wednesday, November 23, 2016 7:05 AM
To: mono-list at lists.dot.net; psantosl at codicesoftware.com
Subject: [Mono-list] mono process - high number of threads

I'm testing a server process running with mono under heavy load.

The server app handles the max number of threads that are available to handle client requests (32) and I can assure you that no new threads are created from our C# code.

However, I see that the number of threads used by the mono process doesn't stop growing (from 15 to 241 after 2 hours of execution time)

I use 'ps -o nlwp <pid>' to monitor the process threads.

Could you explain me why this is happening?

Is there any way to see if mono is launching new threads itself and why?

Rubén.
_______________________________________________
Mono-list maillist  -  Mono-list at lists.dot.net http://lists.dot.net/mailman/listinfo/mono-list


More information about the Mono-list mailing list