Why am I receiving 520 status codes from my app?

Validated on 20 Mar 2025 • Last edited on 3 Apr 2025

A 520 status code means your app returned an invalid or empty response. This can happen when an app crashes while trying to receive an upload or trying to return a response larger than it has been configured to manage.

For example, Next.js apps can return a 520 status code when the app crashes while trying to a return a response size larger than 4 MB or when receiving a file upload larger than 1 MB. The crash usually occurs before any logs can be generated, making it difficult to diagnose.

Before deploying your app to production, we recommend checking your framework’s resource management settings such as memory allocation, request timeouts, maximum payload sizes, and maximum response size, and also error handling for configurations that don’t meet your app’s needs.

Why do I get the error “JavaScript heap out of memory” during deployment?

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?

Delete the existing dev database and create a new one. Then make sure that the app deployment completes successfully.

Why do I get the error "Domain Already Exists" when trying to add a domain to an app in another account?

You cannot add the same domain name to multiple apps or split an app and domain name across more than one account.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.