cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tolo
Frequent Visitor

Delay in first time calling to an Azure Function

Hello,

 

I have created an azure function in order to increment a serial code (ticket) and I have connected that function to a canvas powerapps program through a custom connections in power platform. 

The first time that the program calls to the function take about 39 seconds to response (39.789 ms), after first time only 238 milliseconds. After a while the problem repeats itself. I suspect that the delay occurs owed to some kind of initial authentication with Azure. I don't know if it can be solved with a change of any type of subscription or it is caused by the configuration of the azure function. Also powerapps program is executed in a non production environment (development) at the moment.

 

The code in powerapps: 

 

Set(wTicketCode;
     xxxxxxxx.postincserialcode(
    {
      serialcode: Text(First(ColRecSeriesTicket).cr9de_lastno_used);
      increment: Text(wIncSerie)
    }
  )

)

Any comments are appreciated.

Thanks 

1 ACCEPTED SOLUTION

Accepted Solutions
Tolo
Frequent Visitor

Hi, I've found the solution to the problem.

I've placed a timer to solve it til the Consumption Plan be changed for App Service Plan.

 

I put two links about the 'Cold Start Mode' for Azure Functions if it's in your interest.

 

https://stackoverflow.com/questions/45448040/why-do-azure-functions-take-an-excessive-time-to-wake-u...

https://azure.microsoft.com/es-es/blog/understanding-serverless-cold-start/?ref=msdn

 

Don't Let Get It Cold

Thanks.

View solution in original post

2 REPLIES 2
Tolo
Frequent Visitor

Hi, I've found the solution to the problem.

I've placed a timer to solve it til the Consumption Plan be changed for App Service Plan.

 

I put two links about the 'Cold Start Mode' for Azure Functions if it's in your interest.

 

https://stackoverflow.com/questions/45448040/why-do-azure-functions-take-an-excessive-time-to-wake-u...

https://azure.microsoft.com/es-es/blog/understanding-serverless-cold-start/?ref=msdn

 

Don't Let Get It Cold

Thanks.

View solution in original post

pagonza
Community Support
Community Support

Thank you for the information @Tolo !

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,522)