Skip to content

Slow shutdown for Windows2025 in G4 instance

0

Hello,

I'm using g4dn.2xlarge running Windows 2025. The shutdown process taking awfully long (about 5- 6min) . I've checked the system logs, and found out that Windows is shutting down in 40 seconds roughly:

First msg:

The Windows PushToInstall Service service entered the stopped state.

Logged at: 9/6/2025 3:18:08 PM

Last msg

The operating system is shutting down at system time ‎2025‎-‎09‎-‎06T15:18:50.931017900Z.

However, the status of AWS remains at "stopping..." for the next 5-6 minutes.

I've tried many troubleshooting steps to investigate the issue, but the one worth mentioning is it's happening in a fresh Windows2025 running on g4dn.2xlarge instance too.

Please let me know if you need to know the instance id to investigate

Regards JSashi

asked a month ago173 views
1 Answer
0

Based on your description, it appears there's a discrepancy between when Windows completes its shutdown process (about 40 seconds) and when AWS EC2 actually transitions the instance state from "stopping" to "stopped" (5-6 minutes).

This behavior is not necessarily abnormal. When you initiate a shutdown from within the Windows operating system, the instance enters the "stopping" state while EC2 completes various backend processes. During this time, even though Windows has completed its shutdown procedures, EC2 might still be handling tasks like detaching network interfaces, preparing the EBS volumes, or managing other AWS-specific resources.

For G4 instances specifically, which have NVIDIA GPUs, there might be additional cleanup processes related to the GPU resources that need to complete before the instance fully stops.

While you're in the "stopping" state, you won't be charged for instance usage (you're only charged when the instance is in the "running" state), though you'll still be charged for any attached EBS volumes.

If you need to speed up the shutdown process in the future, you could try using the force stop option through the AWS CLI:

aws ec2 stop-instances --instance-ids your-instance-id --force

You can also add the --skip-os-shutdown parameter if you want to bypass the graceful OS shutdown process, though this should be used cautiously as it might lead to data loss if there are unsaved changes.

If this issue is causing significant problems for your workflow and persists across fresh instances, it might be worth creating a support case with AWS to investigate if there's an underlying issue specific to Windows 2025 on G4 instances.
Sources
Troubleshoot Amazon EC2 instance stop issues - Amazon Elastic Compute Cloud
My Ec2 instance stops completely and does not stop. | AWS re:Post
Change instance initiated shutdown behavior - Amazon Elastic Compute Cloud

answered a month ago
  • Based on the suggestion above, I think this answers some part of the issue:

    For G4 instances specifically, which have NVIDIA GPUs, there might be additional cleanup processes related to the GPU resources that need to complete before the instance fully stops.

    I tried to launch a new instance using t3.medium with Windows2025 and it managed to shutdown in less than 1.5min.

    I need a solution to this problem because we need to use G4 instances for the GPU, and we're using AutoScaling + Warmup pool. We can't really use --force parameter or --skip-os-shutdown as that may corrupt the data, plus autoscaling does the shutting down.

    Please suggest a workaround or fix the issue as we need many instances starting & shutting down fast to be in the warm up pool to cater to many users.

    Regards JSashi