Azure Adopter re-initialize spring boot when we have several functions
Hello, guys,
I have a bug report https://github.com/Azure/azure-functions-host/issues/6719 . I investigate why it happens. I'd like to share it.
When we have more than one functions, once we send request to the other functions, it will re-initialize the spring boot.
To reproduce
- Create function1 and function2
- Start Azure Functions
- send request to function1 -> initialize the Spring Boot then execute function1
- send request to function1 -> execute function1
- send request to function2 -> initialize the Spring Boot then execute function2
- send request to function1 -> initialize the Spring Boot then execute function1
Possible Root Cause
In this logic, the AzureSpringBootRequestHandler has functionName. It compares if it is the same as the functionName and if not the same, it will initialize it.
https://github.com/spring-cloud/spring-cloud-function/blob/a7104e489ec1f608dc7229b9faad12ca6eedf460/spring-cloud-function-adapters/spring-cloud-function-adapter-azure/src/main/java/org/springframework/cloud/function/adapter/azure/AzureSpringBootRequestHandler.java#L81
Sample https://github.com/Azure/azure-functions-host/issues/6719#issuecomment-703119773
Related
https://github.com/spring-cloud/spring-cloud-function/issues/425
I can confirm I had the same issue. Are there any possibility to have this fixed?
I have the same problem. Are there any possibility to have this fixed?
Thanks
We are facing the same problem,
Our clients are pushing us to solve this issue...
We are seeing an excessive increase in the times of the calls to the functions which prevents the migration of the application.
Is there any quick fix for this issue? or any update soon?
Thanks in advance!