threads,memory and resources

i have a code with 10 threads, each thread executes a loop, in each loop it executes a nslookup command shell ( 3500's nslookup aprox), but after a lot of iterations, one message apperars that it says:

"not enough resources... any idea???


  • [b][red]This message was edited by rlc at 2005-10-17 8:45:36[/red][/b][hr]
    Sounds like one of your loops is not exiting creating the infamous "infinite loop". You can do several things,

    1) check the code to ensure that the loops will terminate.

    2) run debug through loop, logging might be a bettter idea if you have a lot of code.

    3) download a memory profile program which will allow you to see what objects are taking what resources and what objects have live referneces still. (you can do a limited amount of this with the perfomance monitor in the os.)

    4) Also if your threads are pausing/waiting for any reason make sure to call a spin or sleep on them.


    EDIT: P.S. make sure top check in depth for an infinite loop before the other options, as a loop of this nature will eventualy make the whole machine poo poo.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion