Internal Server Error while calling azure function from Azure data factory

Mansi Yadav 60 Reputation points
2024-07-20T13:46:57.1066667+00:00

We have written script to download some files from sharepoint to the azure blob storage. Ii have tested the code locally and on the portal too. This function will copy single files so we have placed azure function activity in a for each activity to run it in batches. Now when we run the pipeline some azure function activities fails and when we try to re-run the pipeline all activities are successfully executed. I'm totally confused now why this is happening, please help me to resolve this issue

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 40,656 Reputation points MVP Volunteer Moderator
    2024-07-21T16:11:28.1266667+00:00

    Hi Mansi Yadav,

    Thanks for reaching out to Microsoft Q&A.

    The issue you're experiencing with ADF and Azure Functions, where some Function activities fail during the pipeline execution but succeed upon rerunning the pipeline, could stem from several factors related to concurrency, timeouts &transient error.

    1. Function Timeouts: Azure Functions have default timeouts that can cause them to fail if they take too long to execute.
    2. Enable and review Application Insights and function logs for detailed error messages: This can help identify specific errors or bottlenecks during the execution of your functions. Analyzing these logs can provide insights into why certain executions fail while others succeed Optimize your function code for performance and resource management.
    3. Consider switching to an App Service Plan for better performance consistency.
    4. Implement retry policies in your ADF pipeline.
    5. Check network connectivity and increase ADF timeout settings if necessary.
    6. Conduct load testing to identify and address performance bottlenecks.

    Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.

    0 comments No comments

Your answer

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