An Azure service that provides an event-driven serverless compute platform.
Why does my function inside function app stop working after stopping it overnight?
Hi Team,
I have a function premium app (EP2) plan which has my code deployed. It works fine & I'm able to see the function, click on it & even see the code when I click on 'Get Function URL'. But, when I stop the function app to reduce the overnight cost and restart it next day, I see that the function app starts but function shows a message displayed in red stating "We were not able to load some functions in the list due to errors. Refresh the page to try again." The refresh does not help & the runtime version also shows error. When I click on the function to see my code, it shows "Error while loading". I've tried to diagnose & resolve the problem where it asked me to set FUNCTIONS_WORKER_RUNTIME, even after this the issue persists.
When I create a new function app it works (even if I start & stop the application a couple of times) but when I stop it over night, I see the issue persists. Please let me know what is the reason & how it could be fixed?
Thanks & Regards,
Nikhita Mavinkurve
Azure Functions
-
Anonymous
2025-09-25T14:50:39.31+00:00 Hello Nikhita Mavinkurve,
Thanks for reaching out on Microsoft Q&A. Please provide the information requested in the private message so we can look into this further.
Thanks
-
Pashikanti Kumar • 1,725 Reputation points • Microsoft External Staff • Moderator
2025-09-25T22:07:27.0033333+00:00 Hello Nikhita Mavinkurve,
Misconfigured environment variables like FUNCTIONS_WORKER_RUNTIME block function startup.
Storage account connectivity or permission issues.
• Check Application Insights and Diagnostic Logs for errors during startup.
• Verify that storage accounts (Azure Files/Blobs) used by your function app are accessible and no network/firewall rules block them.
• Review container logs if deploying on custom containers for runtime errors.
• Confirm environment variables such as FUNCTIONS_WORKER_RUNTIME and storage connection settings are present and correct.
• Restart the function app manually and immediately monitor logs for failures or errors.
I hope the provided answer is helpful,
Please "Up Vote" if the information helped you. This will help us and others in the community as well.
Thanks
-
Anonymous
2025-09-29T09:56:10.4533333+00:00 Hello @Nikhita Mavinkurve
Thanks for the response, as i have checked the logs that exception is your current bundle version 3.40.0 will reach end of support on.
Open your
host.jsonfile and change theextensionBundlesection.{
"version": "2.0", "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[4.0.0, 5.0.0)" } } This allows the latest v4 bundle version to be used. Check Compatibility of Your Bindings Not all bindings in v3 are configured the same way in v4. - Review your `function.json` or binding configurations. - Ensure that the triggers/bindings you use are available and supported in v4. Redeploy Your Function Apphttps://learn.microsoft.com/en-us/azure/azure-functions/extension-bundles#upgrade-extension-bundles
Please let me know if issue is resolved.
Thanks
-
LeelaRajeshSayana-MSFT • 17,871 Reputation points • Moderator2025-09-30T00:36:30.4633333+00:00 @Nikhita Mavinkurve We have investigated the logs from the backend and noticed that the function app is failing to start because it failed to fetch the container image for the associated function app. Here is the error message we see in the logs repeatedly -
[BYOS] Custom storage volume(s) failed to initialize: [/var/LWASFiles/Sites/customcontainer/<ID>]When I create a new function app it works (even if I start & stop the application a couple of times)
When you say the function app works after the restart, have you tested the function app end point by invoking it and got a 200 OK or a valid response as expected?
If you are creating a containerized Azure function app, please refer the documentation - Create your first containerized Azure Functions and see How a Function App can be configured with an image
Please let us know more details on how you are deploying the function app, and we should be able to guide you better
-
Nikhita Mavinkurve • 0 Reputation points
2025-09-30T14:54:21.15+00:00 Yes, I ran our connector against it & it worked without any issue. I've also tried the steps mentioned above but they were of no use. Is there anything else I need to try? Do I need to upgrade the plan?
-
Nikhita Mavinkurve • 0 Reputation points
2025-10-01T15:31:18.39+00:00 Hi Team,
Any update on this?
Regards,
Nikhita
-
LeelaRajeshSayana-MSFT • 17,871 Reputation points • Moderator2025-10-01T21:27:16.59+00:00 @Nikhita Mavinkurve Could you please confirm whether you're still using the same Function App name that you previously shared via private comments? We're currently unable to locate any logs associated with it.
Additionally, if you have followed any specific articles or documentation for deploying the Function App using containers, could you kindly share those references with us? This would help us replicate the setup locally.
-
Rakesh Mishra • 11,350 Reputation points • Microsoft External Staff • Moderator
2025-10-03T09:09:41.41+00:00 @Nikhita Mavinkurve, following up to see if you had a chance to check LeelaRajeshSayana-MSFT's previous response. Please do share the requested information if you're still facing the issue and need any further assistance on this.
-
Nikhita Mavinkurve • 0 Reputation points
2025-10-03T13:31:02.5+00:00 No, we have deleted it as the cost was going up.
-
Nikhita Mavinkurve • 0 Reputation points
2025-10-03T16:30:17.33+00:00 On October 1, we shut down our “CustomContainer” Function due to a RunTime Version error that prevented its use. Later that day, I created an identical Function named “usingpyc” and started it. Everything worked as expected, and I stopped it before leaving. On October 2, my manager restarted the “usingpyc” Function App but encountered the same RunTime Version error. She monitored it throughout the day, but the issue persisted, so she stopped it that evening. Today, October 3, I started the “usingpyc” Function App again, and it is functioning correctly—the error is gone, and the function is fully accessible.
We’re trying to understand why the function worked on Day 1, failed on Day 2, and is now working again on Day 3. This inconsistency doesn’t appear to stem from a misconfiguration on our end, and it’s currently blocking deployment to a customer’s account. Any insight into what might be causing this behavior would be greatly appreciated.
-
Anonymous
2025-10-03T18:22:42.6833333+00:00 I hope you checked my response, and it was helpful. Please do let me know if you need any further assistance on this.
Thanks
-
Anurag Rohikar • 3,190 Reputation points • Microsoft External Staff • Moderator
2025-10-17T14:31:14.31+00:00 Hello Nikhita Mavinkurve, here’s a summary of the issue, findings, and recommendations based on a recent case with a Function App on a Premium plan (EP2):
Issue:
- After stopping the Function App overnight, upon restart, the portal showed:
- “We were not able to load some functions in the list due to errors.”
- Runtime version errors
- “Error while loading” when opening functions
- Restarting the app later made it work again.
Root Cause:
- Using internal diagnostics tool, it was observed that the container timed out during startup.
- The container started but didn’t respond to platform health checks within the default 230 seconds, causing the runtime to be marked unavailable.
- This behavior is typical after extended stops (cold starts), not due to a deployment or configuration issue.
Recommendations:
- Increase container startup timeout
- Set the application setting:
WEBSITES_CONTAINER_START_TIME_LIMIT = 1800 - This gives the container up to 30 minutes to initialize, avoiding startup timeout issues.
- Set the application setting:
- Optimize Docker images (optional)
- Smaller images can start faster and slightly reduce startup time.
- This is a performance optimization but does not replace the timeout setting.
- Minimize full stop/start cycles
- Instead of stopping the Function App, consider scaling down temporarily to save cost.
- Keep Always On = On for Premium plans to maintain a warm host.
- Monitor via Application Insights
- Use the detector “Function app down or reporting errors” for quick diagnostics.
- Note the exact UTC timestamp if the issue reoccurs for backend correlation.
- Verify settings
- PORT setting (if used) matches the runtime’s expected port.
References:
- Azure Functions diagnostics overview
- Azure Functions best practices
- Environment variables and app settings in Azure App Service
I hope this summary helps. Please do let us if you have any further questions. Thank you!
- After stopping the Function App overnight, upon restart, the portal showed:
-
Anurag Rohikar • 3,190 Reputation points • Microsoft External Staff • Moderator
2025-10-27T09:25:11.02+00:00 Hello Nikhita,
As confirmed by your team, the function app is now visible and responsive on the portal. It seems the function is running fine, as we’ve verified that it's returning 200 OK responses after the recent restart.If everything is working as expected on your end, great! However, if you still encounter issues, please monitor the endpoint and keep us posted. Should you notice any further discrepancies in the UI, it may be a portal-related issue that the product team needs to investigate.
Thank you!
Sign in to comment