App Platform memory heap error and page could not be served after deploy

Hello! I deployed on App Platform yesterday and got a “Heap out of Memory” build error, which prevented my app from being deployed. After some online searching [1], I then added these 2 environment variables:


This caused my app to deploy successfully, but the Health App Check became “Unavailable” and when I tried to access my website, it displayed “We encountered an error when trying to load your application and your page could not be served. Check the logs for your application in the App Platform dashboard.”.

Anyone know what’s going on here?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I am still facing the same issue. Anyone knows the solution?

Hey there!

It sounds like your application may not actually have fully deployed if the health checks are failing. You will want to reference your application logs to see the errors being provided there. The message We encountered an error when trying to load your application and your page could not be served" typically indicates a 5xx error of some kind. Your logs should provide more details on it. You can also open your browser developer console and check the error shown there.

For the health checks you will want to make sure your application is set to listen on and not or localhost. You’ll also want to ensure you aren’t running any long migrations or other processes during the deploy that may prevent your application from being able to respond to health checks. You can move those to post deploy jobs instead.

Lastly if needed you can modify the health checks to start at a later time. You would need to edit the intial_delay_seconds to increase the amount of time before health checks start.

Hope it helps! Nate