hi,
i'm not sure if this is the right place for this post, but i couldn't find a
better one.
i'm writing code which iteratively updates a database for ~3000 objects.
the app is built as a console application, and i'm using writes to the
console to help me monitor what's going on in the code. there are ~3 writes
per object, so say ~10,000 for the whole procedure.
occasionally my app will hang on the statement console.writeline('text')
any ideas on what's going on here? should i be clearing the console, or
some input stream, or something like that? i tried to do that from the
command window with the app paused, but i get the message 'expression cannot
be evaluated at this time'.
any help much appreciated. i'm not a pro on this stuff, but i'd like to
learn.
matthew
Nick Malik - 30 Sep 2004 15:10 GMT
when you say your app will "hang", do you mean that it will completely stop
and never restart, or that it slows to a dead crawl for an apparently "long"
period of time before returning to normal operation?
You could be simply running into garbage collection. All those string
messages may be using objects from the heap that have to be collected.
--- Nick
> hi,
>
[quoted text clipped - 17 lines]
>
> matthew
matthew c. harad - 04 Oct 2004 18:59 GMT
interesting. thanks for the response.
re: your question i'm not sure. i never let it sit longer for say 10
minutes.
how could i check whether i am running into garbage collection?
> when you say your app will "hang", do you mean that it will completely stop
> and never restart, or that it slows to a dead crawl for an apparently "long"
[quoted text clipped - 28 lines]
> >
> > matthew
Nick Malik - 04 Oct 2004 19:26 GMT
well... gc doesn't take that long. Unless your system is particularly
stressed, that probably isn't it.
Any possibility that your network connection is having trouble staying
consistent, or that your db connection is being dropped?
That could cause a transaction to go into a long wait before timing out. A
couple of those, and there's your 10 minutes.
--- Nick
> interesting. thanks for the response.
>
[quoted text clipped - 35 lines]
> > >
> > > matthew