# Why is my App Platform build or deployment failing with an out of memory error? ## Build Failing with Out of Memory Error App Platform builds have a combined 8 GB of RAM and disk available, regardless of the plan size. You cannot increase the amount of memory available, so if your build is failing because it runs out of memory, try optimizing your build. - Having a large repository and a lot of small files can increase memory overhead, so try decreasing the amount of files in the application to free up more memory during the build. We especially recommend this for static sites. - As an alternative, you can [build your app as a Docker image](https://docs.digitalocean.com/products/app-platform/reference/dockerfile/index.html.md) and then [upload it to DigitalOcean Container Registry](https://docs.digitalocean.com/products/container-registry/index.html.md). Because this method uses a local build, App Platform skips the build process and deploys directly from the image. ## Deployment Failing with Out of Memory Error The amount of memory available to your app’s deployment depends on the [App Platform plan](https://docs.digitalocean.com/products/app-platform/details/pricing/index.html.md). If your deployment is running out of memory, you can [scale the app](https://docs.digitalocean.com/products/app-platform/how-to/scale-app/index.html.md) to a larger plan. ## Related Topics [How do I fix the error "Record is managed by an App on this account, and cannot be deleted"?](https://docs.digitalocean.com/support/how-do-i-fix-the-error-record-is-managed-by-an-app-on-this-account-and-cannot-be-deleted/index.html.md): Use the app’s Settings tab to remove domains associated with App Platform apps. [Why do I get the error “JavaScript heap out of memory” during deployment?](https://docs.digitalocean.com/support/why-do-i-get-the-error-javascript-heap-out-of-memory-during-deployment/index.html.md): Increase the heap memory by setting the environment variable NODE\_OPTIONS=–max-old-space-size=4096. [How do I fix a "permission denied for schema public" error in my dev database?](https://docs.digitalocean.com/support/how-do-i-fix-a-permission-denied-for-schema-public-error-in-my-dev-database/index.html.md): Delete the existing dev database and create a new one. Then make sure that the app deployment completes successfully.