M
Max Vernon
I have built some software that uses a variable number of threads. If I use
about 400 or so threads, the code runs fine, however when I use above about
800 or so I get System.OutOfMemoryException in various places such as
System.Threading.Thread.Sleep(0)
I need to use a relatively large number of threads since each thread access
a Web Service with inherent processing delays at the server end. Each thread
basically starts and then waits for the io completion before returning
results to the main application.
According to Windows Task Manager, my app is using 200M of memory. VM size
is just shy of 1GB. Task Manager reports I have 2.6GB available RAM (I'm not
using a pagefile at all). Clearly, I'm not out of memory, so something else
must be the root cause of this issue. Any ideas?
I'm using:
Visual Studio Pro 2008 Visual Basic
App is configured to use .Net 3.5
Machine is Windows XP x64 Pro with 8GB RAM
about 400 or so threads, the code runs fine, however when I use above about
800 or so I get System.OutOfMemoryException in various places such as
System.Threading.Thread.Sleep(0)
I need to use a relatively large number of threads since each thread access
a Web Service with inherent processing delays at the server end. Each thread
basically starts and then waits for the io completion before returning
results to the main application.
According to Windows Task Manager, my app is using 200M of memory. VM size
is just shy of 1GB. Task Manager reports I have 2.6GB available RAM (I'm not
using a pagefile at all). Clearly, I'm not out of memory, so something else
must be the root cause of this issue. Any ideas?
I'm using:
Visual Studio Pro 2008 Visual Basic
App is configured to use .Net 3.5
Machine is Windows XP x64 Pro with 8GB RAM