wont shutdown 4a

For topics about current BETA or future releases, including feature requests.

wont shutdown 4a

Postby roedygr » Fri Aug 01, 2008 3:35 pm

I get a message about waiting for link checking to terminate. It takes maybe a minute to shut down.

You need something more brutal.
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 249
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Postby RSteinwand » Fri Aug 01, 2008 3:50 pm

User avatar
RSteinwand
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 199
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND

Re: wont shutdown 4a

Postby Albert Wiersch » Fri Aug 01, 2008 4:14 pm

roedygr wrote:I get a message about waiting for link checking to terminate. It takes maybe a minute to shut down.

You need something more brutal.


Hello,

Did it take a minute to shut down but it did shut down without problems (other than the delay)?

I could just "force" a shutdown but prefer to shutdown cleanly.

If it took a minute, then it's likely due to waiting for a timeout from the OS. If there are no timeouts, then it should shutdown faster. I could potentially do something about this but I don't think it is worth the time at this point, but I'll keep it in mind.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: wont shutdown 4a

Postby roedygr » Tue Aug 05, 2008 8:20 pm

Albert Wiersch wrote:Did it take a minute to shut down but it did shut down without problems (other than the delay)?


I believe if I am patient enough it eventually terminates without problem. If the user is shutting down, there is no point in continuing the link checks.
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 249
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Re: wont shutdown 4a

Postby roedygr » Fri Aug 08, 2008 6:16 am

roedygr wrote:I get a message about waiting for link checking to terminate. It takes maybe a minute to shut down.

You need something more brutal.


With 4B I had a 20 second shutdown wait.
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 249
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Re: wont shutdown 4a

Postby Albert Wiersch » Fri Aug 08, 2008 9:20 am

roedygr wrote:With 4B I had a 20 second shutdown wait.


How long it takes to shutdown cleanly when link checking will depend on multiple factors. Most of the time and for most people, I suspect it would be less than 20 seconds, but could go 20 seconds or longer.

Do you think it would be better if I just forced the shutdown and did a "dirty" shutdown? I don't know if that could cause crash problems or not, but it might.

You could also turn off automatic link checking and only run it manually so there's less of a chance a link check is still running when you shutdown.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: wont shutdown 4a

Postby roedygr » Sat Aug 09, 2008 3:48 pm

Albert Wiersch wrote:
roedygr wrote:With 4B I had a 20 second shutdown wait.


How long it takes to shutdown cleanly when link checking will depend on multiple factors. Most of the time and for most people, I suspect it would be less than 20 seconds, but could go 20 seconds or longer.

Do you think it would be better if I just forced the shutdown and did a "dirty" shutdown? I don't know if that could cause crash problems or not, but it might.

You could also turn off automatic link checking and only run it manually so there's less of a chance a link check is still running when you shutdown.



I am pretty sure you can do this safely and quickly 99% of the time Here is how.

1. you send out a polite shutdown request to the link-checking threads. They check a flag periodically and if they see it shut down.

2. You shut down everything else.

3. You now have a few link-checking threads waiting on i/o, who have not yet got around to checking the graceful shutdown flag.

4. Ask the user if he want to force the shutdown. If he says yes, kill the threads. They should die relatively cleanly since they should all be waitiing on i/o. One might go crazy, but the user is semi-prepared for that. You could give a warning prompt with instructions on how to use taks manager to kill it if it hangs.

5. if the user says no. just wait for the threads to quit naturally.

If you are doing local link checking a 3 second timeout should be more than adequate, or do it with file i/o which has no timeout.

Another totally different approach is to configure local link checking on and remote link checking off. Then your threads should never wait long.

You might like to read up on what on what I have to say about link checking. see http://mindprod.com/application/brokenlinksmanual.html
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 249
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Postby Albert Wiersch » Mon Aug 11, 2008 11:58 am

Thanks for the suggestions. I am already doing some similar things to what you mention when shutting down the link checking threads.

In BETA 5, if waiting after 5 seconds for the link checking threads to quit, it will ask the user if he/she wants to force the shutdown. If the user says 'No', then it will ask again after 60 seconds if it's still waiting for some reason.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to CSE BETA Talk

Who is online

Users browsing this forum: No registered users and 2 guests