Azure Queue Functions firing but then disappearing RRS feed

  • Question

  • I have a case of a long-running function on a consumption plan that isn't firing.  The situation is this:

    o A startup function is fired by an HTTP message.  

        o That function fires off 30 queue entries. (a)

           o Each of the 30 queue entries fires the queue function

             o Queue function deletes its own queue item from the queue to keep things neat.

             o Queue function runs for 6 minutes, then "chains" by adding a queue element to the same queue.  This function

                is written to issue a message every so often with some unique information to the ID

                o The chained functions fire, but then sometime after starting, they inexplicably exit. 

                   By this, I mean the messages stop from almost all the function instances (1 remains).  The remaining function

                   seems to chain fine from that point.

    Cannot seem to find any logs which indicate why the functions are exiting.  The streaming logs just stop, and that's it.

    These functions are precompiled types, built with the latest version of Visual Studio and in C# .NET with Net 4.6.1.

    -- me --

    Friday, November 17, 2017 9:45 PM

All replies

  • You mentioned that your function runs for 6 minutes.  Under Consumption Plan, Azure Functions has a default execution time limit of 5 minutes.  You may configure it to run up to 10 minutes, after which, any outstanding work may be terminated.  If you have not configured the timeout to 10 minutes or your Function execution exceeds the timeout period, then it could explain why the execution was terminated prematurely.
    Friday, November 17, 2017 10:03 PM
  • The single instance never reaches that mark, although together they do.

    The chaining process works like this:

    o "A" instance run until timer (set for less time than the limit) expires

    o "A" instance submit job to chain itself, but keep running

          o "B" instance, startup, and set a table entry to tell all that it is running

    o "A" instance see the updated table entry and then exit.

    As you can see, "A" and "B" overlap for a while, but each instance by itself does not exceed the time limit.  What I have been seeing is that after "A" exits, "B" seems to also exit most of time, but not all of the time.  When it does, though, I don't get a message that says "function xxxx success or failure".  It just stops producing output, viewed from the streaming log console on Azure.

    I hope that's clearer.



    -- me --

    Saturday, November 18, 2017 3:41 PM