Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
When the log stops after Oryx writes startup.sh the usual causes are:
Oryx didn’t finish (or wasn’t allowed to) build/install your app dependencies, so the process that runs the startup command never gets a runnable environment;
the App Service startup command is wrong (or not using the $PORT env var); or
you intentionally disabled the automatic build (SCM_DO_BUILD_DURING_DEPLOYMENT=false) but didn’t supply a pre-built app (virtualenv/site packages) — so Oryx has nothing to run.
create-script only generates the platform startup script. If dependency installation / virtualenv creation is required but disabled, the runtime never becomes ready and logs appear to “hang” at that point.
Quick checklist & fixes
Re-enable build-on-deploy (recommended for most cases)
In the Azure Portal → your Web App → Configuration → Application settings set:
SCM_DO_BUILD_DURING_DEPLOYMENT = true
Then redeploy. This lets Oryx install packages from requirements.txt and create the virtualenv automatically.
If you want to keep SCM_DO_BUILD_DURING_DEPLOYMENT=false (pre-built deployment)
Pre-build locally and deploy a runnable artifact:
Create and include a virtual environment inside `/home/site/wwwroot/antenv` (or the virtualEnvName you configured).
Ensure `antenv/bin/activate` and installed packages are present on the target. (Note: shipping virtualenvs between different Linux distributions/versions can break binary wheels — building inside the same distro as App Service is safest.)
Or use the built artifact (wheel, container image, or a zip that already has `site-packages`) and use ZIP or container deployment.
**Use the correct startup command and port**
Azure App Service passes the port in the environment variable `PORT`. Your startup command must use that:
```yaml
uvicorn talkie.main:app --host 0.0.0.0 --port $PORT
```
Put this exactly (or set it in Portal → **Configuration** → **General settings** → **Startup Command**). Hardcoding `8000` can fail if the platform expects `$PORT`.
**Check the runtime stack / Python version**
Portal → **Configuration** → **General settings** → **Stack**. Ensure Python version matches what your app expects and what you built against.
**View more logs (Kudu / diagnostic logs) to see what's blocking**
Enable detailed logging: Portal → **App Service logs** → enable **Application Logging (Filesystem)** and **Platform logs**.
Tail logs with Azure CLI:
```dockerfile
az webapp log tail -n <appName> -g <rg>
```
Check Kudu/SSH (Advanced Tools):
Go to **Development Tools > Advanced Tools (Kudu)** → **Debug console** → look inside `/home/site/wwwroot` and `/home/LogFiles` for oryx/diagnostic logs.
Check `/home/LogFiles/oryx/*` and `/home/LogFiles/docker/*` and `/home/LogFiles/Application/*.log`.
**Inspect the generated startup script**
Use Kudu debug console to open `/opt/startup/startup.sh` (or the script Oryx wrote). Confirm it’s invoking the right virtualenv and startup command. If it references a missing virtualenv, that explains the hang.
**If dependency install is the blocker**
If `pip install` is taking too long or stuck (large wheels or private indexes), either:
Let Oryx run builds (enable SCM build), or
Pre-build wheels and vendor them, or
Make sure your `requirements.txt` contains only what you need and there is no interactive prompt (e.g., private package auth).
- For repeated deployment issues: prefer containerization
- If reproducible environment matters, containerize the app (Docker) and deploy to App Service for Linux as a container — you control the full runtime and nothing relies on Oryx.When the log stops after Oryx writes
startup.shthe usual causes are: - Oryx didn’t finish (or wasn’t allowed to) build/install your app dependencies, so the process that runs the startup command never gets a runnable environment;
- the App Service startup command is wrong (or not using the
$PORTenv var); or - you intentionally disabled the automatic build (
SCM_DO_BUILD_DURING_DEPLOYMENT=false) but didn’t supply a pre-built app (virtualenv/site packages) — so Oryx has nothing to run.
create-scriptonly generates the platform startup script. If dependency installation / virtualenv creation is required but disabled, the runtime never becomes ready and logs appear to “hang” at that point. Quick checklist & fixes- Re-enable build-on-deploy (recommended for most cases)
- In the Azure Portal → your Web App → Configuration → Application settings set:
Then redeploy. This lets Oryx install packages fromSCM_DO_BUILD_DURING_DEPLOYMENTrequirements.txtand create the virtualenv automatically.
- In the Azure Portal → your Web App → Configuration → Application settings set:
- If you want to keep
SCM_DO_BUILD_DURING_DEPLOYMENT=false(pre-built deployment)- Pre-build locally and deploy a runnable artifact:
- Create and include a virtual environment inside
/home/site/wwwroot/antenv(or the virtualEnvName you configured). - Ensure
antenv/bin/activateand installed packages are present on the target. (Note: shipping virtualenvs between different Linux distributions/versions can break binary wheels — building inside the same distro as App Service is safest.) - Or use the built artifact (wheel, container image, or a zip that already has
site-packages) and use ZIP or container deployment.
- Use the correct startup command and port
- Azure App Service passes the port in the environment variable
PORT. Your startup command must use that:
Put this exactly (or set it in Portal → Configuration → General settings → Startup Command). Hardcodinguvicorn8000can fail if the platform expects$PORT.
- Azure App Service passes the port in the environment variable
- Check the runtime stack / Python version
- Portal → Configuration → General settings → Stack. Ensure Python version matches what your app expects and what you built against.
- View more logs (Kudu / diagnostic logs) to see what's blocking
- Enable detailed logging: Portal → App Service logs → enable Application Logging (Filesystem) and Platform logs.
- Tail logs with Azure CLI:
az webapp - Check Kudu/SSH (Advanced Tools):
- Go to Development Tools > Advanced Tools (Kudu) → Debug console → look inside
/home/site/wwwrootand/home/LogFilesfor oryx/diagnostic logs. - Check
/home/LogFiles/oryx/*and/home/LogFiles/docker/*and/home/LogFiles/Application/*.log.
- Inspect the generated startup script
- Use Kudu debug console to open
/opt/startup/startup.sh(or the script Oryx wrote). Confirm it’s invoking the right virtualenv and startup command. If it references a missing virtualenv, that explains the hang.
- Use Kudu debug console to open
- If dependency install is the blocker
- If
pip installis taking too long or stuck (large wheels or private indexes), either: - Let Oryx run builds (enable SCM build), or
- Pre-build wheels and vendor them, or
- Make sure your
requirements.txtcontains only what you need and there is no interactive prompt (e.g., private package auth).
- If
- For repeated deployment issues: prefer containerization
- If reproducible environment matters, containerize the app (Docker) and deploy to App Service for Linux as a container — you control the full runtime and nothing relies on Oryx.
- If reproducible environment matters, containerize the app (Docker) and deploy to App Service for Linux as a container — you control the full runtime and nothing relies on Oryx.When the log stops after Oryx writes