Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2004

Tip: Looking for answers? Try searching our database.

hanging on console.writeline

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
matthew c. harad - 29 Sep 2004 20:37 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.