Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Function apps still running the end-of-life v3 runtime on Linux in a Consumption plan stop running after September 30, 2026. To avoid service disruption, migrate your app to the v4 runtime.
The option to host function apps on Linux in a Consumption plan is retiring on 30 September 2028. The Linux Consumption plan isn't getting any new features or language versions. Apps running on Windows in a Consumption plan aren't currently affected. Migrate your apps to the Flex Consumption plan before the retirement date.
When you use the Consumption plan, the Azure Functions host dynamically adds and removes instances based on the number of incoming events.
The Consumption plan automatically scales, even during periods of high load. When you run functions in a Consumption plan, you pay for compute resources only when your functions are running. On a Consumption plan, a function execution times out after a configurable period of time. The Consumption plan is currently the only serverless hosting option that supports Windows.
Read-only application directory on Linux Consumption
On the Linux Consumption plan, the /home/site/wwwroot directory and its subdirectories are read-only.
- Apps can continue to read deployed files from this directory and its subdirectories.
- Apps can't create, modify, or delete files, or change file permissions, in these locations.
- Apps that attempt these operations might experience startup or execution errors. This condition includes application code and libraries that write generated output, caches, logs, or downloaded dependencies to these locations.
Note
Temporary storage is instance-local. Don't rely on temporary files persisting across app restarts or being shared between instances. Use Azure Storage for persistent or shared data.
Required action
If your app performs file operations, follow these steps to ensure it doesn't write to /home/site/wwwroot or its subdirectories.
- Review file operations. Check your application code, libraries, and configuration for operations that create, modify, or delete files, or change file permissions, under
/home/site/wwwroot. Check relative paths because they might resolve to the application directory. - Redirect temporary writes. Configure your application and its libraries to use a writable temporary directory, such as
/tmp, for temporary files, generated output, caches, and temporary logs. Use the configuration options supported by each library; there isn't a single setting that redirects every file operation. - Update application settings where applicable. In the Azure portal, open your function app, then select Settings > Environment variables > App settings. Update any application-specific settings that control writable paths. See Manage your function app. Changing app settings restarts the app, so plan accordingly.
- Move persistent or shared files to durable storage. Use Azure Storage for files that must persist across restarts or be shared between instances.
- Deploy and validate your changes. Test application startup and representative function executions in Azure, including file operations in the configured writable locations. Review startup and execution errors by using Application Insights monitoring. Successful local testing alone doesn't verify the deployed file system behavior.
Important
The Linux Consumption plan retires on September 30, 2028. Migrate to the Flex Consumption plan to continue receiving new features. See Migrate Consumption plan apps to Flex Consumption in Azure Functions.
Flex Consumption apps also run from a read-only deployment package. Migration doesn't make /home/site/wwwroot writable, so these file operation changes also apply when preparing your app for migration.
Billing
Billing is based on the number of executions, execution time, and memory used. The system aggregates usage across all functions within a function app. For more information, see Azure Functions pricing.
To learn more about how to estimate costs when running in a Consumption plan, see Understanding Consumption plan costs.
Multiple apps in the same plan
The general recommendation is for each function app to have its own Consumption plan. However, if needed, you can assign function apps in the same region to the same Consumption plan. Keep in mind that there's a limit to the number of function apps that can run in a Consumption plan. Function apps in the same plan still scale independently of each other.
Migrate to Flex Consumption
If you have existing function apps running on the Consumption plan, migrate them to the Flex Consumption plan. The Flex Consumption plan provides faster scaling, reduced cold starts, virtual network integration, and configurable instance sizes. Because the Flex Consumption plan is Linux-only, Windows Consumption plan apps must also migrate to Linux as part of this process. For step-by-step instructions, including Windows-specific guidance, see Migrate Consumption plan apps to the Flex Consumption plan.