We've encountered a similar issue with some of our Windows Server 2019 VMs. The WinHTTP Proxy Service stopping and being unable to send HTTP requests is indeed problematic, especially for 24/7 services.
From our experience at Laptops Insights, here are a few steps you can try to resolve this issue:
Check for Windows Updates: Ensure that your server is fully updated. Sometimes, this issue can be due to a bug that has been fixed in a later update.
Review Group Policies: Group policies related to network settings and proxy configurations might be causing conflicts. Double-check any policies applied to the affected servers.
Reset WinHTTP Proxy Settings:
Open Command Prompt as an administrator.
Run netsh winhttp reset proxy.
Check Dependencies: The WinHTTP Web Proxy Auto-Discovery Service depends on other services. Ensure that all dependencies are running properly. You can check this by:
Open the Services control panel.
Find the "WinHTTP Web Proxy Auto-Discovery Service".
Right-click and select "Properties".
Go to the "Dependencies" tab and verify that all listed services are running.
Event Viewer Logs: Apart from the specific error you mentioned, look for any other related errors or warnings around the same time frame. They might give more insight into what's causing the issue.
Check Network Settings: Sometimes, incorrect or changing network settings can cause this issue. Ensure that the network configuration on the affected VMs is consistent and correct.
If none of these steps resolve the issue, consider creating a scheduled task to restart the WinHTTP service automatically at regular intervals. This is not a permanent fix but can help mitigate the impact until a more permanent solution is found.
Let me know if any of these steps help or if you need further assistance.