A graceful termination of the application, either in response to some input or by internal logic. Usually applied for applications that need to run certain code in order to terminate in consistent way.
Questions tagged [application-shutdown]
170 questions
0
votes
1 answer
How to code a scheduled/triggered/ondemand webjob console app to detect shutdown so it can be handled gracefully?
I am running an existing c# .net app as a triggered(OnDemand, not Continuous with queues/triggers/functions) webjob. Sometimes it is long running, like 30+ minutes. Works great.
[Edited]
If I try to stop the webjob, by setting WEBJOBS_STOPPED to 1…

Bo A
- 138
- 9
0
votes
1 answer
nodejs: release resources on http.createServer shutdown
I developed a proxy server using node. I start the proxy with something like this (that is, I'm not using express, just plain http module):
http.createServer(onRequest).listen(config.port);
In the middle I iniatilize an sql server connection pool,…

opensas
- 60,462
- 79
- 252
- 386
0
votes
0 answers
App not closing in debug mode when using "X" in upper RH corner
I have an app that is not closing properly. There is a user control that appears twice in the form. Using debug I can see the following code in Form1.Designer executed twice:
protected override void Dispose(bool disposing)
{
if…

Eric Snyder
- 1,816
- 3
- 22
- 46
0
votes
1 answer
Shutting down a foreground thread on application quit?
I am trying to figure out a way to shutdown my foreground thread in the event that my application quits/terminates/etc..
From what I have tested and read about, it is to my understanding that the main thread is always last to execute. Is this always…

Buretto
- 405
- 4
- 12
0
votes
0 answers
Lifecycle (starting, shutting down) of a ScheduledExecutorService inside a Spring Signleton
I'm using a ScheduledExecutorService inside a Spring Singleton. It executes a periodical check that's scheduled to run every x minutes. I'm lazily (or half-lazily) initializing the Singleton member variables (the Executor) by implementing a…

Ido Gal
- 528
- 10
- 26
0
votes
2 answers
Hook in befor App.Exit
Here is my problem:
In my WPF application I have a MyBaseControl (derives from System.Windows.Controls.ContentControls) and a lot of MyCustomControls which derives from MyBaseControl. I need to do some storing and cleanup operations for all my…

Felix
- 105
- 1
- 7
0
votes
2 answers
configuring HTTP endpoint to shutdown a spring boot web application
I have a Spring boot application running. Referring https://stackoverflow.com/a/36275797/6038386 to gracefully shut down the server, I included all changes in my pom.xml and application.properties.
Problem is when I am running spring boot server on…

Naveen Kumar
- 384
- 2
- 11
- 31
0
votes
1 answer
Shutting down spring boot application on db table space error
I have the following scheduled piece of code in my Spring Boot Application:
@Scheduled(fixedDelay = DELAY_SECONDS)
private void processJobQueue() {
BlockingQueue jobQueue = JobQueueFactory.getJobQueueInstance();
while…

M06H
- 1,675
- 3
- 36
- 76
0
votes
1 answer
App shutdown by Android when in background, How to stop?
I have developed a busy app used for GPS tracking. It works well while in the foreground. It uses GPS/location callbacks along with background services for Text-to-Speech, messages and Heart Rate Monitor hardware. The problem is that Android OS…

Chris King
- 225
- 1
- 4
- 14
0
votes
1 answer
Send close message around application
I have a Eclipse E4 application with multiple connections to different servers. Now when opening a MPart the part will call the server to receive his data. Also when the MPart is closed the client send the close to the server so that the client…

JimmyD
- 2,629
- 4
- 29
- 58
0
votes
2 answers
Combination of [spring] DefaultShutdownStrategy, [camel] ShutdownAware and [camel] Processor doesn't works
I have camel Processor which is starting Thread
this Processor implementing spring ShutdownAware
When I send TERM signal (graceful shutdown) to application I do not receive any information about - any method from ShutdownAware interface were…

THM
- 579
- 6
- 25
0
votes
0 answers
Background vs. Foreground threads in .NET Core
I'm trying to write a daemon app using .NET Core (whether I also use ASP.NET Core is still TBD), and I intend to run this app on linux. The daemon process will essentially be a chron job, and my plan is to implement it as a Task that contains an…

gzak
- 3,908
- 6
- 33
- 56
0
votes
1 answer
Graceful shutdown of Azure worker role
Let's consider a worker role that:
Hosts a WCF server
Listens to a few Azure Storage Queues and Service Bus queues
The processing methods perform some Azure Storage I/O, HttpClient calls to external APIs and Entity Framework calls. Now I want my…

UserControl
- 14,766
- 20
- 100
- 187
0
votes
1 answer
How to programmatically shutdown a Spring Application by itself on Tomcat
How can we shutdown or stop a Spring application by itself programmatically?
We have currently using ConfigurableApplicationContext#close(), and yes, it does close the application but not shutdown or stop the application.
From the tomcat manager,…

Bruce
- 647
- 2
- 12
- 30
0
votes
0 answers
How to shutdown application and then read exit code
I want my WPF application to shutdown and restart in different ways.
To do this I am using:
Application.Current.Shutdown(exitCode);
this is easy. But how to read the exit code when restarting?
I have found this solution with
int exitCode =…

Patrick
- 3,073
- 2
- 22
- 60