Azure Function App throws internal server error.

Antara Das 376 Reputation points
2022-02-14T15:22:35.917+00:00

After repeated attempts with running function app and connecting with fivetran we constantly get either internal server error or module not found : requests , even though we have requests in our requirements.txt.

[Error] Executed 'Functions.function' (Failed, Id=id, Duration=3ms)

Would are we possibly doing wrong? Any leads will be helpful.

Thanks

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,889 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,136 Reputation points
    2022-02-15T03:23:55.443+00:00

    @Antara Das As per the error module not found : requests' looks like you have not installed the module requests. But as you have confirmed that you have mentioned requests in your requirements.txt file but I will suggest you to review your application insights logs to verify if the module was installed correctly.

    To troubleshoot these types of errors you can always refer to this document.

    If you have any requirement where you need to use any other packages that are not predefined in the functions then you need to add the names or names along with versions of the required packages to the requirements.txt file. Please refer to this document for more details

    Your requirement.txt file will be as below per the exception but in case if you are using any other packages then please make sure that you have defined the same.

    azure-functions  
    requests  
    

    For your reference, I will suggest you to review this article which will can help you to monitor azure function and will help you with the internal error full exception trace. Once you have set it up you can see the above error in application insights. You can also see these exceptions in the storage account that you have configured on your function app.
    You can also refer to Diagnose and solve problems blade for any issue such as 500 internal error, slowness etc that will suggest you the action plan to mitigate the issue.

    Hope the above helps you to resolve the issue. Feel free to get back to me if you need any assistance.


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.