How To Identify Windows Services Delaying Shutdown Or Startup
You can control the order of service startup and shutdown with thedepends_on option. Compose always starts and stopscontainers in dependency order, where dependencies are determined bydepends_on, links, volumes_from, and network_mode: "service:...".
How to identify Windows Services delaying Shutdown or Startup
If I start the service manually, and after I do shutdown, everything is ok when I turn on again the PC. So the services are automatically started as should be. The problem appear only if I restart Windows. After restart, these services are not started automatically.
The only solution that works for the moment is to change the startup type of these services from Automatic to Automatic Delayed.I don't know if this is the best solution , but is the only that works for now.
I had the same problem. The services did not restart automatically after the machine was restarted.The reason is that the Windows 10 shutdown button does not mean (unlike Windows 7) a shutdown but can be considered as a standby if the "Set Power Buttons" configuration is as this.
Starting with Windows 8.x, the default shutdown and restart scenario has been updated and named fast startup. Fast startup begins with the shutdown process and includes writing data to disk similar to the hibernate process. A key difference is that all user sessions (Session 1) are logged off and the remaining information is written to the hiberfile. When you boot the PC from this state, Windows loads the previously initialized state by reading from the hiberfile, instead of running the full boot process in which Windows, drivers, devices, and services are initialized. This method speeds up the process of initializing the lock or Start screen.
The faster startup and shutdown sequence uses the hibernate infrastructure to place the PC in hibernate. Unlike a full shutdown and boot, the user session is closed and a hibernate is performed. As a result, the hibernate file is much smaller, ensuring that the hibernate and resume process is faster. This sequence also takes advantage of the parallelization optimizations.
Developers creating drivers or apps with a system service and system integrators should monitor driver quality issues, such as memory leaks. Although driver quality has always been important, note that the up-time between kernel reboots might be significantly longer than on previous versions of Windows because during user-initiated shutdowns, the kernel, drivers, and services are preserved and restored, not just restarted.
To ensure the best compatibility with apps while enabling the best possible experience for new apps, new flags to request a shutdown for fast startup have been created. The following table describes the new flags and the behavior of the shutdown APIs. Details on these APIs and flags are available on MSDN.
Device drivers will receive a notification to transition to an S5 target power state on shutdown rather than a hibernate state of S4, which is the actual power state. This allows the drivers to set a different wake behavior for fast startup after a shutdown. Target and effective states are found in the System_Power_State_Context structure.
More than one way to start WindowsThe first step in rooting out the cause of interminable boots is using the System Configuration utility's "Diagnostic startup" option. Press the Windows key (in XP, the Windows key plus R), type msconfig, and press Enter. Under the General tab, select "Diagnostic startup" and click OK. When you restart Windows, only basic services and devices will be available. With this option selected, Windows should start in just seconds.
System Configuration's "Selective startup" option lets you exclude system services and/or start-up items when Windows loads. Microsoft provides more information on these and Vista's other System Configuration options in a Help and How-to article, Using System Configuration. Similar information for XP is available in Microsoft's "System Configuration Utility overview."
I know I'm bringing this up from the dead but I found it helpful and hope to add a little to the topic. I'm implementing a WCF duplex library hosted in a Windows Service and came across this thread because I needed to detect, from within the windows service, when a user logs off or shuts down the computer. I'm using .Net Framework 4.6.1 on Windows 7 and Windows 10. Like previously suggested for shutdown what worked for me was overriding ServiceBase.OnShutdown() like so:
If you set up both an Administration Server and a Managed Server to run as Windows services on the same computer, modify the WebLogic Server master script so that the Managed Server starts only after the Administration Server finishes its startup cycle. For more information, refer to Requiring Managed Servers to Start After Administration Servers.
Sometimes, applications are temporarily unable to serve traffic.For example, an application might need to load large data or configurationfiles during startup, or depend on external services after startup.In such cases, you don't want to kill the application,but you don't want to send it requests either. Kubernetes providesreadiness probes to detect and mitigate these situations. A pod with containersreporting that they are not ready does not receive traffic through KubernetesServices.
Have you ever seen that your computer starts booting slowly? Or it slowly restores its state from hibernation. Maybe you observe performance issues when shutdown or hibernate process? In this article, I will show you how you can use Event Log Explorer to find performance problems linked with the startup/shutdown/hibernate/resume processes.
I believe this is due to a windows update, all of the users services were starting automatically and recently they have stopped auto starting. As time goes on and more people update, more and more services may stop automatically starting this could be a big problem.
Services feature a very basic interface, but within it are hundreds of services, most bundled with Windows 10 and others added by third parties. At the top are menus for customizing the view of your services and changing their startup behavior. By default, we are in detail view, which displays columns with the description, running status, startup type and Log On As.
Some services are set to manual while others are automatic. Automatic services are those that startup with Windows 10, while those that are manual are only triggered on demand by a program or device. If there is a service you think you need to have started with Windows, you can change it by right-clicking the service, then clicking Properties.
If the boot time improves in the clean boot environment, look for startup apps that are bogging down your computer. To identify the problematic app, enable all the services and turn off the clean boot in System Configuration. Restart your PC and make a note of all the apps that run at startup. Disable each program one by one to identify and delete the malfunctioning app.
You can also set the service startup type via the registry via PowerShell. All Windows services are stored in the HKLM\System\CurrentControlSet\Services registry key. Each service child key has a REG_DWORD value called Start that represents the startup type (excluding delayed start).
Windows can take longer than usual to shut down when services, background processes, drivers or applications prevent it from shutting down normally. Diagnose and solve a shutdown issue by viewing running processes in Task Manager, clean-booting your laptop or starting Windows in safe mode.
If your laptop shuts down normally with all services and startup items disabled, one of these processes is preventing Windows from shutting down normally. To determine which one it is, experiment by enabling several startup items or services until the problem returns, then systematically narrow down the enabled processes until you find the one causing a problem.
windows_service 'name' do binary_path_name String delayed_start true, false # default value: false dependencies String, Array description String desired_access Integer # default value: 983551 display_name String error_control Integer # default value: 1 load_order_group String pattern String reload_command String, false restart_command String, false run_as_password String run_as_user String # default value: "localsystem" service_name String # default value: 'name' unless specified service_type Integer # default value: 16 start_command String, false startup_type Symbol # default value: :automatic status_command String, false stop_command String, false supports