Azure / Azure/Azure-Functions

Azure Functions shared static service provider or variable locking issue.

Open
#1,202 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

@brettsam wondering if something recently was patched and deployed with Azure functions surrounding static service variables across multiple functions in the same App. For, example we have an Azure Function App that has 6 functions inside it. They all call the same BuildServiceProvider code with the same static variable names. 6am UTC on 4/20/2019 they started randomly erroring out due to services not being resolved. The only way to get them to work again was to separate them out to separate apps for the time being.

We eventually resolved the problem by using a lock on the service provider variable so it could not be effected by the other function methods.

Wondering if you have any insight on this. This is the line being called in each function.

`private static readonly IServiceProvider _services = FunctionHelper.BuildFunctionServiceProvider();`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.