Question

Alexander Helsinghof on Mon, 23 Oct 2017 07:28:04


Hello!

I have a function app in azure portal which is not being triggered everytime I call it. I feel like the app is in "sleep mode" and when I do a request to my app I get a respond after 2-3 times.. I believe It's reailly important to make this work on the first trigger since I need to transfer some important data to clients.

Example

1. I am requesting the function app with an ajax httppost.

2. I want to receive a "ok" but nothing happens.

3. I am requesting the function app again. (sometimes I receive "ok" sometimes nothing happens).

4. After 2-3 times requesting the function app its "awake" and everyting works really smooth.

5. Now I go to bed, wakes up the other day.

6. Same story. Its not "awake"..

I am using a consumption plan (pay as you go I think?) and I've read that this should have the attribute "always on" so I don't have to bother about this.. What am I missing?

Please help me with this issue.

Best regards,

Alexander


Sponsored



Replies

Fabio Cavalcante on Mon, 23 Oct 2017 18:15:49


When you say nothing happens, can you elaborate on the actual behavior observed? Is the request timing out? How long do you wait between your first and second request? 

Would you mind sharing your function app name either directly or indirectly (as documented here) so we can investigate on our end?

Kigosrazer on Wed, 25 Oct 2017 04:53:05


When i say nothing happens I mean I’m getting a time out, so nothing happens in the function app. If I then wait around 15-30 seconds it works. My function app: function-serviceapp My trigger: redovisningsmaklarna-mailfunction Thanks!!! //Alexander

Chris Anderson (Azure) on Mon, 27 Nov 2017 19:08:46


This is likely due to cold start - your Function isn't always running and it takes time to warm up. What kind of Functions are you writing? Do you have lots of dependencies or warm up code?

Kigosrazer on Tue, 28 Nov 2017 12:19:40


Why isn't it always running?

I created a mail function just to send some mails when applying an interest on my website.

This is likely 1-3 mails a day... However I need the function to always be warmed up..

How can I achieve this?

Best regards,

Alexander