SSH connection frequently terminating.

YogeshMct 0 Reputation points
2024-08-01T09:47:12.03+00:00

Hello,

I am trying to connect via SSH using the following path: App Service → Development Tools → SSH → Go. However, the connection is frequently terminating, which prevents me from running the data migration command.

Could you please assist with this issue?

Thank you.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,636 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 17,886 Reputation points
    2024-08-01T21:11:22.12+00:00

    Hi @YogeshMct we are sorry to hear you're facing this issue. Do you have " Always on" enabled? the “Always On” setting is enabled for your App Service. This prevents the app from going idle and helps maintain a persistent connection. You can enable this from the Azure Portal: Navigate to your App Service > Configuration > General settings > Always On.

    Here are some additional things you can try to troubleshoot:

    1. If you’re using a lower-tier App Service Plan, consider scaling up to a higher tier. This can provide more resources and stability for your app.
    2. Use the App Service diagnostics tool to identify any potential issues. Navigate to your App Service in the Azure Portal > Diagnose and solve problems > Review the “Configuration and Management” and “Availability and Performance” options.
    3. Enable application logging, web server logging, and detailed error messages to get more insights into what’s causing the connection drops. You can do this from the Azure Portal under App Service logs.
    4. If the in-browser SSH session is unstable, consider using remote SSH. You can create a remote connection using the Azure CLI:
         az webapp create-remote-connection --subscription <subscription-id> --resource-group <resource-group-name> -n <app-name>
      
      This command sets up a TCP tunnel, allowing you to connect to your app’s container from your local machine.
    5. Lastly, try restarting your web app. Sometimes simply restarting the web app can resolve transient issues.

    Hope that helps.

    -Grace

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.