question

OscarSavolainen-3917 avatar image
0 Votes"
OscarSavolainen-3917 asked MayankBargali-MSFT edited

500 Error in Azure function

Good day,

My function works locally, but when hosted on Azure functions it returns a 500 error whenever it's called. The logs don't reveal anything particularly useful:
[Verbose] Posting invocation id:e0c48141-fc90-49e3-8de9-f1f44293a9e7 on workerId:d8dcb07e-8068-48a6-9770-2f892b55ac98

and then error.

Time stamp of last call is = 2021-06-12T15:52:49Z
Id=e0c48141-fc90-49e3-8de9-f1f44293a9e7
Location = South central US

I was hoping for some help, I'm not experienced with Azure functions.

Best regards and many thanks,
Oscar

azure-functions
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.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT edited

Hi @OscarSavolainen-3917

Welcome to Microsoft Q&A! Thanks for posting the question.

In scenario where you are observing 500 error the suggestion would be to review the application insights log of your function app.
It looks like there are trouch dependencies causing the issue and I can see the error "No such file or directory". Please review your init.py line 188 that is causing the error.

You can try installing all the dependencies using requirement.txt and see if it helps you but I doubt it will help as we can see that under the instructions it talks about installing it the dependencies first from source. Looks like using pip doesn't install it from the source, which is unfortunate here because otherwise, remote Build would have handled it.

In this case, it looks like build native dependency will also not help. Using a custom container would be a better approach in this case.

For full stack trace of the error please review my private comment. You can refer to this document to troubleshoot some of the python error in azure functions.

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.