You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/quickstart-python.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,13 +229,13 @@ App Service automatically detects the presence of a Django app. No additional co
229
229
230
230
### [Azure CLI](#tab/azure-cli/fastapi)
231
231
232
-
For FastAPI, you must configure a custom startup command for App Service to run your app.
232
+
For FastAPI, you must configure a custom startup command for App Service to run your app. Set the following command to start Gunicorn with 2 Uvicorn worker processes: `gunicorn -w 2 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 main:app`.
233
233
234
234
First, configure the startup command using the [az webapp config set](/cli/azure/webapp/config#az-webapp-config-set) command.
@@ -270,9 +270,9 @@ App Service automatically detects the presence of a Django app. No additional co
270
270
271
271
#### [Azure portal](#tab/azure-portal/fastapi)
272
272
273
-
For FastAPI, you must configure a custom startup command for App Service to run your app.
273
+
For FastAPI, you must configure a custom startup command for App Service to run your app. Set the following command to start Gunicorn with 2 Uvicorn worker processes: `gunicorn -w 2 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 main:app`.
274
274
275
-
First, configure the startup command. Under **Settings**, on the left menu, select the app's **Configuration** page, then select **General settings**. In the **Startup Command** field, enter *python main.py*. Then select **Save** to apply the changes. Wait for the notification that the settings have been updated before proceeding.
275
+
First, configure the startup command. Under **Settings**, on the left menu, select the app's **Configuration** page, then select **General settings**. In the **Startup Command** field, enter *gunicorn -w 2 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 main:app*. Then select **Save** to apply the changes. Wait for the notification that the settings have been updated before proceeding.
276
276
277
277
Next, restart the web app. Select the app's **Overview** page on the left menu. On the top menu, select **Restart**.
0 commit comments