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
Two processes of func reusing the same configuration settings #1414
Comments
Can you elaborate on your scenario? are you actually using this to run production workloads, or is this while testing your functions? The configuration mechanism supported today is |
I do not modify configuration in func.exe.config. Of course, I use local.settings.json. The problem is that two func commands actually running the same process. Under the hood there is a node process and then the .Net Core func.exe process. As I have learned at a start local.settings.json are being integrated to func.exe.Config and then node starts func.exe which hosts the actuall function app. it was designed to run exclusively one instance:
That is exactly the problem: func.exe.Config is unique for the machine, not the process, when I run two instances at the same moment, sometime it goes like this
|
Apologies for the delayed response. For clarity, what Node process are you referring to above? Our Node boostrapper doesn't make any modifications to the func.exe.config file. Is this something you have setup? Is this something you can provide repro steps for? Thank you for all the additional information! |
in v1, the cli actually updates |
thanks for the update @ahmelsayed ! I actually completely forgot that was the case, but now remember you bringing this up. @borysl I'm not sure this is a fix we would target for V1. Would a move to V2 be an option for you? Another option would be to execute the CLI binaries from different locations, but that does require some work with your process. If the current workaround is working for you, I'd recommend keeping that until you have the ability to upgrade. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am using v1 and I need to run two Function Apps locally with different settings and as the result different local.settings.json
As the result I have batch file like this:
however func.exe process uses the same properties from %AppData%\npm\node_modules\azure-functions-core-tools\bin\func.exe.Config
which means it will be overridden with local.settings.json from fa1 and fa2 in unclear order. Which is disaster.
Workaround can be that we load settings from local.settings.json in code, but in this case we actually provide different implementation from what we have in Azure Function themselves.
I also can have solution like this:
3 seconds is enough to load settings and then to let node replace the func.exe.Config with new one. However, in this case if functions will be recompiled they will receive different properties.
The text was updated successfully, but these errors were encountered: