But, if I make any change in the database through the web interface, I need to restart the function app to reflect the latest database changes.
The APIs are not returning the latest values without restart.
It is strange that you must restart the function to get the database changed value.
I guess this may related with the azure function cache.
I suggest you could firstly check you have enabled the cache for the azure function.
Then I suggest you could use postman to send the request to the azure function to check you have got the update database value.
If this still couldn't solve your issue, I suggest you could post the details codes and setting about your azrue function for us to reproduce the issue.
Best Regards,
Brando
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
5 Points
24 Posts
Azure function app needs to be restarted after database change.
Aug 03, 2018 07:25 AM|priya.renjith|LINK
Hi,
I have a function app which provides set of apis to a mobile app. And I have a web interface to update the values in the database.
But, if I make any change in the database through the web interface, I need to restart the function app to reflect the latest database changes.
The APIs are not returning the latest values without restart.
Is there any other alternative to reflect the database changes without restart.
Please help.
Star
9831 Points
3120 Posts
Re: Azure function app needs to be restarted after database change.
Aug 06, 2018 02:38 AM|Brando ZWZ|LINK
Hi priya.renjith,
It is strange that you must restart the function to get the database changed value.
I guess this may related with the azure function cache.
I suggest you could firstly check you have enabled the cache for the azure function.
Then I suggest you could use postman to send the request to the azure function to check you have got the update database value.
If this still couldn't solve your issue, I suggest you could post the details codes and setting about your azrue function for us to reproduce the issue.
Best Regards,
Brando