question

WilliamAWang-0291 avatar image
0 Votes"
WilliamAWang-0291 asked WilliamAWang-0291 edited

Azure function return 500 without log

This request body works good in my local debug env, but in the cloud it returns 500, and this result doesn't inside the logs and app insight, everything looks good.

100937-image.png


100993-image.png


100994-image.png


azure-functions
image.png (204.2 KiB)
image.png (28.4 KiB)
image.png (105.1 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.

Besides, I added another function called "test" in there and publish to cloud but the function hub still got only one in there. And if I use postman to call the test function in the cloud will get the same result: 500.

100983-image.png


100996-image.png


0 Votes 0 ·

1 Answer

MayankBargali-MSFT avatar image
1 Vote"
MayankBargali-MSFT answered WilliamAWang-0291 edited

Hi @WilliamAWang-0291

You can navigate to application insights logs for your function app to verify what is causing the 500 error.
Looks like you have not specified the FUNCTIONS_WORKER_RUNTIME in your function app that is causing the issue.

· 12
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.

Thanks for your notification.
You might noticed that the last log is in May 6th and there is no more log since that. And I viewed the Activity log and found there are log of "Update App Service Network Configuration failure " in May 8th, because we made some network changes during these days. And the storage service is inside the VN but the function is not, that is why it failed without any logs.
And I was wondering why there is no logs if the function failed because it lost connection with the storage. That should be very dangerous because if it could push some logs in app insight then we can using the alerts to send email or something to our staffs that fix it ASAP, but the function down for 3 weeks and nobody knows. If our customer doesn't contact us then it will continue off work.

0 Votes 0 ·

@WilliamAWang-0291 Interesting, the logs should be pushed to the application insights whenever the function app gets called until there is an issue communicating with the function app and application insights (configuration issue). To troubleshoot it further I will suggest you to open a support ticket with us. If you don't have a support plan then please let me know.


0 Votes 0 ·

What I told you is true, if the function and storage has disconnected then call func will fail and no more info gonna push into app insights.
You can try it your self, create a func a vnet and a storage, assign the storage inside vnet but func is not. Then you can test the func and see the result. I think you gonna have the same experience with me.

0 Votes 0 ·
Show more comments