cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Generative AI
Explore discussions on generative artificial intelligence techniques and applications within the Databricks Community. Share ideas, challenges, and breakthroughs in this cutting-edge field.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Both Databricks Apps Returning 502 Bad Gateway

Jeneive
New Contributor II

I am experiencing an issue with both of my Databricks Apps. Both applications are currently unavailable and are returning the same 502 Bad Gateway error.

This is affecting both applications, so I would appreciate it if you could investigate whether there is a workspace, deployment, networking, or Databricks Apps platform-related issue.

App 1: #https://vidhai-base-7474644715059240.aws.databricksapps.com/?utm_source=chatgpt.com

Username: jeneive.dhanapalan@gmail.com

Issue: Both Apps are returning 502 Bad Gateway and are not accessible

This issue is currently blocking my work, and I would appreciate immediate assistance in identifying and resolving the problem

2 REPLIES 2

ThomazNeto
Databricks Partner

Hi,

A 502 at the app URL means the Databricks reverse proxy can reach the platform but not your app process. Two things to check first, because both apps failing at once points to something common rather than a bug in either one.

First, and this is my guess given the gmail account: if this is a Free Edition workspace, the docs say "Apps run for up to 24 hours after being started, updated, or redeployed. After that, the app is automatically stopped." Open each app in the workspace, look at the status in the Overview tab (Running / Stopped / Deploying / Crashed), and if it says Stopped just start it again. The 24 hour clock restarts on every start or deploy.
https://docs.databricks.com/aws/en/getting-started/free-edition-limitations
https://docs.databricks.com/aws/en/dev-tools/databricks-apps/key-concepts

Second, if the status is Crashed, read the logs before restarting: Logs tab in the app page, or append /log to the app URL, or from the CLI databricks apps logs your-app-name --tail-lines 200. Logs are not kept once the compute stops, so grab them right after a failed start. The most common self-inflicted cause of 502 in my experience is the app not binding to 0.0.0.0 on the port in DATABRICKS_APP_PORT, which the docs list as a hard requirement.
https://docs.databricks.com/aws/en/dev-tools/databricks-apps/monitor
https://docs.databricks.com/aws/en/dev-tools/databricks-apps/best-practices

Thomaz A. Rossito Neto
Principal Data Architect & AI Strategy โ€” CI&T
thomazn@ciandt.com
linkedin.com/in/thomaz-antonio-rossito-neto

Jeneive
New Contributor II

Thank you for the detailed guidance. The issue has been resolved, and both applications are now working fine.

My assumption is that the issue was related to the application authentication check. The apps are now working independently without requiring authentication.

I appreciate your help and the troubleshooting suggestions.