Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a timeout when polling for new blobs (from CRI) #2834

Open
hossam-nasr opened this issue Feb 24, 2022 · 0 comments
Open

Add a timeout when polling for new blobs (from CRI) #2834

hossam-nasr opened this issue Feb 24, 2022 · 0 comments

Comments

@hossam-nasr
Copy link

hossam-nasr commented Feb 24, 2022

Timebox polling for new blobs when using storage blob triggers, and throw a timeout error when the timeout is exceeded.

This would be something like this:

public static async Task<TResult> WithTimeout<TResult>(this Task<TResult> task, TimeSpan timeout)
{
    if (task == await Task.WhenAny(task, Task.Delay(timeout)))
    {
        return await task;
    }
    throw new TimeoutException();
}

And change ExecuteAsync here to use WithTimeout when polling for new blobs. When the TimeoutException is thrown, we can signal a restart for the listener, or even the whole Function host.

This issue was surfaced by a CRI, in which the SDK stopped polling for new blobs without throwing any exception or error. We couldn't find the exact cause of the issue, but it wasn't mitigated until the customer restarted the function app.

@ghost ghost assigned soninaren Feb 24, 2022
@soninaren soninaren removed their assignment Sep 5, 2022
@soninaren soninaren added this to the Triaged milestone Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants