question

HERMESThomasDuvivier-1452 avatar image
0 Votes"
HERMESThomasDuvivier-1452 asked MayankBargali-MSFT commented

Python Azure Function App - Service Unavailable

Hello,

On Friday my function apps were working properly.

Since today, when I tried to deploy from VS Code, I got the "Service Unavailable" error (screenshot 1).

When I check the activity logs, I get errors such as "The connection has been closed by the client while the server is still processing its request for 'Microsoft.Web" (screenshot 2). Or "Encountered an error (ServiceUnavailable) from host runtime." (screenshot 3).

When I go to "Functions" to Monitor the functions, I get the warning "Azure Functions runtime is unreachable" (screenshot 4), and when I open a function to see the code, I get "Editing functions in the portal is not supported for Linux Consumption Function Apps.", which is unexpected as I did have the code displayed there last week.

I did not change anything since last week when it worked fine.

I tried upgrading my version of Core Tools before re-deploying but I keep getting the same error.

I also tried Refresh, Restart, Stop and Start the Azure function app but it did not solve anything.

Please let me know if you need more information to help me solve this problem.
Thank you in advance,
Thomas Duvivier

103444-image.png
103491-image.png
103379-image.png
103386-image.png
103387-image.png


azure-functions
image.png (7.0 KiB)
image.png (24.5 KiB)
image.png (23.1 KiB)
image.png (18.9 KiB)
image.png (10.0 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Update: Here is more info about the error that is in the Activity Log.

103430-image.png


0 Votes 0 ·
image.png (197.0 KiB)
MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered HERMESThomasDuvivier-1452 commented

@HERMESThomasDuvivier-1452 Looks like you have performed multiple operation start/stop function app and the function runtime was not started up correctly by the time you have performed the operation. It look like your function app is working correctly now with two function trigger.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, how is the stop/start related to the problem as it did not work before I did those steps ?

0 Votes 0 ·
MayankBargali-MSFT avatar image MayankBargali-MSFT HERMESThomasDuvivier-1452 ·

@HERMESThomasDuvivier-1452 Can you confirm the exact timeframe (in UTC) when you have observed the issue first time when you have done the remote build?
I can see the operation around 6/8 11:32 UTC. You can verify the same from activity logs

0 Votes 0 ·

I see 11:52 when looking at the logs.

0 Votes 0 ·
HERMESThomasDuvivier-1452 avatar image
0 Votes"
HERMESThomasDuvivier-1452 answered MayankBargali-MSFT commented

Hi, I still get this service unavailable error, the retry parameter makes it workaround sometimes (or waiting before trying again) but not always. Do you have an idea where this could come from ? I get this problem from multiple azure function resources.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@HERMESThomasDuvivier-1452 I

503 service unavailable will be caused for the following reasons

  • Function host is down/restarting

  • Platform issue due to the backend server not running/ allocated

  • Memory leak/issue from the code causing the backend server to return 503

The suggestion is to look into the "Diagnose and solve problems" blade in the Function app and select the "Function app down or reporting" detector. This detector will show all the diagnostic information about the function app and its infrastructure. This will give some insights about the function host related issues. Also, check the Web app restarted section to see if there were any platform related issues that could contribute to 503 error. Please note that if you are running on Linux platform, then you would get information about the container recycles in the Web app restarted detector.

If you have already verified it at your end then the suggestion would open a support ticket with us to review the logs that cause service unavailable. If you don't have the support plan then please refer to my private comment so we can assist you further.

0 Votes 0 ·