question

EberBezzone-3063 avatar image
0 Votes"
EberBezzone-3063 asked MayankBargali-MSFT commented

Azure functions: Zip deploy logs auto-deleted after a random period of time

I've been deploying azure functions (zip deploy) through:

and I face the same problem with all those since the kudu deployments logs are deleted after some time. When this happens, all deployments logs are deleted, letting scm.azurewebsites.net/api/deployments totally empty.
The thing is I can't find any configuration for this like a retention policy or something. I controlled it and I saw some logs even made it for hours while others only 2 minutes, so I can't even know how much time I have to check those deploy. I would like to have those logs in a permanent way.
Right now I'm testing it in a Linux consumption plan.
Any ideas what am I missing?

azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EberBezzone-3063 avatar image
2 Votes"
EberBezzone-3063 answered MayankBargali-MSFT commented

Thanks for your support. I already open a ticket and so far y fix it by adding a new app setting:
ENABLE_KUDU_PERSISTENT_STORAGE = 1
I let this information here in case someone else is having the same issue.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@EberBezzone-3063 Thanks for the update. Feel free to 'Accept it as answer' so that it can help others in the community looking for help on similar issue

0 Votes 0 ·
JaliyaUdagedara avatar image
0 Votes"
JaliyaUdagedara answered EberBezzone-3063 edited

As far as I know, Deployment logs shouldn't get deleted unless we delete them explicitly.

The logs are stored in the storage account, did you check the storage account? It should be inside File Shares inside your function storage account. You can also send the platform logs to different destinations if you want to.

Create diagnostic settings to send platform logs and metrics to different destinations

Please let us know what you find. Thanks!

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

As far as I know, Deployment logs shouldn't get deleted unless we delete them explicitly.

Yes, that was also my thought

In the storage account, there is nothing. which make sense since I don't see the de logs in Kudu

0 Votes 0 ·
MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT commented

@EberBezzone-3063 The KUDO logs are controlled by the fileLoggingMode property in the host.json file.
With the debugOnly(the default option) property we will delete the file it's older than 1 day old and won't log more than 5 MB (cant be increased).
With the Always property we will keep them always but it is not recommended especially for production apps and the suggestion would be using application insights.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi! Thank you for answering.

I thought that option was related to the logs that are produced by the application and I was just interested in the deployments logs.
But even if that is the case, I don't want to put it in "always" but anyway I don't get even the "1-day retention" nor 5MB.
2 Odd things.
1. I abled "Application insight", no change, logs still "disappearing"
2. I tried with the "Diagnose and solve problems" and in the "Function App Deployment History" section I can see in the graph all the deployments were made, but again not in Kudu.
Is Kudu the best and reliable way to check and confirm that the zip deployment was correctly deployed?

0 Votes 0 ·

@EberBezzone-3063 Apology I have misunderstood the question. The one I have posted is for the execution logs of your function app using KUDO. For the deployment logs as Jaliya's has mentioned is the right. Let me test it at my end and will get back to you if I observed the same behaviour.

1 Vote 1 ·

Thanks! Please, let me know if I can provide more information!

0 Votes 0 ·
Show more comments