error:- The specified CGI application encountered an error and the server terminated the process.

Alvaro Vinicius 41 Reputation points

ProGet (NuGet) web site and Service stopped working.

When connecting to which is hosted on Azure VM we get this error:- The specified CGI application encountered an error and the server terminated the process.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
5,977 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
5,679 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 15,447 Reputation points Microsoft Employee

    Issue Summary:
    The issue as I understand is that you are getting Error Message: 'The Specified CGI application encountered an error and the server terminated the process' and you are looking for help to resolve it.


    I would recommend enabling stdout logs, eventlog.xml for exceptions and using Custom auto heal feature which would help in troubleshooting the issue.

    Consider configuring Custom Auto heal, to collect some data (like profiler trace or memory dump) that will help you debug the issue further. The triggers and actions allow you to define various conditions based on request count, slow requests, memory limit on which you can take specific actions like restarting the process, logging an event, or starting another executable.

    Please follow these instructions to configure an auto healing rule:

    1. Go to Azure portal, under particular app service select/search diagnose and solve problems option from navigation bar.
    2. Under diagnose and solve problems please select diagnostic tools.
    3. Under diagnostic tools, select Auto Heal option and custom auto heal rules.
    4. For http errors, please select status codes.

    For the concerned issue, we would also recommend you to upgrade to latest version of Netcore and check, as most of the CGI issues are resolved in the latest version.

    I would like to share about few other features which would help to Create Robust apps on App services :

    1.Have web app running on Multiple Instances.

    2.Enable Health Check -Used to prevent unhealthy instance(s) from serving requests, thus improving availability .

    3.Enable Application Init - Helps in warmup of the instance before receiving HTTP requests

    4.Enable Local cache – Provides immunity for storage latencies, Platform upgrades and unplanned maintenance

    5.Enable AutoHeal

    6.Avoid App Density

    7.Stay within safe limits on disk space usage - Ensure that the disk space used by www folder should be less than 1GB. File system usage can be tracked from “App Service Plan “à “Quotas” section in Azure portal.

    8.Enable Application Insights Profiler and exception tracking for future downtime investigations .

    9.Invest in Azure Frontdoor and App services in multiple regions to achieve uptime even if a datacenter or region has outages.

    Please let me know if you have any questions regarding the same.

    2 people found this answer helpful.
    0 comments No comments