Leonardo Muzzi wrote:
around 30000 handles for the process
Thats too much. AFAIK, the handles count includes the file handles, threads, mutex, semaphore etc. Look at the application source and ensure the resources are properly released. No resource should live longer than expected. Get some memory profilers and analyze the object allocation and GC activities.
Other way is to log the application activities and analyze the log. This will help you to understand which area it is spending more time and what resources are not getting released properly.
Leonardo Muzzi wrote:
windows service app that relies on multiple threads functionality to process many socket requests at a time,
How are you doing this? Each thread per request? If yes, consider using asynchronous methods provided in the socket class. Asynchronous methods makes it possible to write highly thread efficient applications.
Here[
^] is a decent MSDN article which takes the subject in detail.
:)