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: 

Databricks app crash

kay0291
New Contributor

Hello everyone,

I am working on a databricks app project. IT's a chatbot on a monorepo wih a frontend built with next.js and a fastapi backend. 

Sometimes the app crashes unexpectedly. In the logs i see these messages : 

-> sending sigterms to other processes
npm run start:api exited with code 137
Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons) at TCP.callback...
Failed to proxy http://localhost.... ERROR: read ECONNRESET 
Killed


Any ideas ? I know the project setup is not ideal but i still don't get why the sudden crashes happen. 

Thank you.

1 REPLY 1

sarahbhord
Databricks Employee
Databricks Employee

Hey Kay0291 -

Your logs suggest the app is running out of memory: exit code 137 means the OS killed your process (likely exceeding Databricks Apps’ 2 vCPU/6GB RAM limit). This often happens when both Next.js and FastAPI run together, especially under load, and can lead to ECONNRESET errors when the backend crashes and the frontend can’t connect.

Quick tips:

  • Monitor memory use locally under similar load and check for memory leaks or heavy caching in your code.
  • Reduce the number of worker processes for both Next.js and FastAPI to stay within the memory cap.
  • Scale down concurrent users or requests if possible, and offload heavy tasks to Databricks Jobs or Model Serving.
  • If the issue persists and isn’t memory-related, check for missing environment variables or dependency issues.

Note that Databricks Apps is designed for Python API backends with static JS/React assets—server-side Node.js isn’t fully supported. More flexible compute options are planned for the future.

Let me know if you need more details on any of these steps!

Best

Sarah