G
Guest
I have a window service written in VB.NET to scan directory and process file.
During directory scanning (scheduled by timer using
System.IO.Directory.GetFiles method), I can observe that the column "Handles"
in "Task Manager" will increase gradually but will be dropped after a short
while.
But when CPU is busy (reach 100%), the number specified by "Handles"
increases continuously until I have to manually stop the window service or
the server will be run out of resources. During this period of time, the "VM
Size" increases faster than "Mem Usage". Some readings of the window service
I grabbed from "Task Manager" are shown as follows:
CPU - 40%
Mem Usage - 66, 180K
VM Size - 175, 380K
Handles - 190, 172
Thread - 62
Any idea why the I/O handles cannot be released but instead grows
continually and tremendously?
Directory.GetFiles method will tentatively cause this problem?
Why the VM Size is increased faster than Mem Usage in this case?
What workaround can be added to my code to handle the problem?
Thanks
During directory scanning (scheduled by timer using
System.IO.Directory.GetFiles method), I can observe that the column "Handles"
in "Task Manager" will increase gradually but will be dropped after a short
while.
But when CPU is busy (reach 100%), the number specified by "Handles"
increases continuously until I have to manually stop the window service or
the server will be run out of resources. During this period of time, the "VM
Size" increases faster than "Mem Usage". Some readings of the window service
I grabbed from "Task Manager" are shown as follows:
CPU - 40%
Mem Usage - 66, 180K
VM Size - 175, 380K
Handles - 190, 172
Thread - 62
Any idea why the I/O handles cannot be released but instead grows
continually and tremendously?
Directory.GetFiles method will tentatively cause this problem?
Why the VM Size is increased faster than Mem Usage in this case?
What workaround can be added to my code to handle the problem?
Thanks