Erlang runtime handle leak?

Jan Jacobs hpjcon@REDACTED
Thu Aug 19 20:28:55 CEST 2010


  Hi,

I noticed an increase of handles been used by the runtime (erl).
Using handle.exe utility on the erl runtime I get the following:

Start:

Handle v3.42
Copyright (C) 1997-2008 Mark Russinovich
Sysinternals - www.sysinternals.com

Handle type summary:
   ALPC Port       : 4
   Desktop         : 1
   Directory       : 8
   EtwRegistration : 25
   Event           : 2075
   File            : 78
   IoCompletion    : 5
   Key             : 18
   KeyedEvent      : 2
   Mutant          : 2
   Process         : 15
   Semaphore       : 16
   Thread          : 1046
   Timer           : 6
   TpWorkerFactory : 16
   WindowStation   : 2
Total handles: 3342

Hour Later:

Handle v3.42
Copyright (C) 1997-2008 Mark Russinovich
Sysinternals - www.sysinternals.com

Handle type summary:
   ALPC Port       : 4
   Desktop         : 1
   Directory       : 8
   EtwRegistration : 25
   Event           : 2152
   File            : 78
   IoCompletion    : 5
   Key             : 18
   KeyedEvent      : 2
   Mutant          : 2
   Process         : 15
   Semaphore       : 16
   Thread          : 1046
   Timer           : 6
   TpWorkerFactory : 16
   WindowStation   : 2
Total handles: 3390


The Event handles increased by 77.
I am not sure if it is a result of me not closing socket/files correctly?
I do not know the internals of the VM, which actions in the code can 
cause this?

Platform and runtime:
Windows 2008 64Bit
R14A

Basic summary of application operation:
Read from socket and write to file. (No SSL)
Read from file and write to socket. (No SSL)
Web/SOAP operations with SSL.
ODBC Database interactions.
Running as a service.

Any help or suggestions will be appreciated.

Cheers
Jan



More information about the erlang-questions mailing list