-
Notifications
You must be signed in to change notification settings - Fork 79
feat(docs): add troubleshooting guide for common application issues #3485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sc-zenokerr
wants to merge
5
commits into
master
Choose a base branch
from
fix/3100/troubleshooting-page
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4e56acd
feat(docs): add troubleshooting guide for common application issues
sc-zenokerr a75e711
Split app crash docs into troubleshooting subpages
benjaminach ba86d12
Rename troubleshooting index to overview
benjaminach b95ee31
Update image size
benjaminach 7e0f0a8
Restructure deployment troubleshooting docs
benjaminach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| --- | ||
| index: 12 | ||
| --- |
94 changes: 94 additions & 0 deletions
94
src/_posts/platform/app/troubleshooting/2000-01-01-boot-and-startup-errors.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| --- | ||
| title: Boot and Startup Errors | ||
| modified_at: 2026-04-10 00:00:00 | ||
| tags: troubleshooting crash startup boot timeout hook | ||
| index: 3 | ||
| --- | ||
|
|
||
| Boot and Startup Errors occur when the platform tries to start your application's containers, before they reach the *running* state. | ||
|
|
||
| For a broader overview, see [Troubleshooting Your Application]({% post_url platform/app/2000-01-01-troubleshooting %}). If the deployment fails before the containers are started, see [Deployment Issues]({% post_url platform/app/troubleshooting/2000-01-01-deployment-issues %}). If your application starts successfully and fails later, see [Runtime Issues]({% post_url platform/app/troubleshooting/2000-01-01-runtime-issues %}). | ||
|
|
||
| There are 3 kinds of Boot and Startup Errors: | ||
| [Start Errors](#understanding-start-errors), | ||
| [Timeout Errors](#understanding-timeout-errors) and | ||
| [Hook Errors](#understanding-hook-errors). | ||
|
|
||
| ## Understanding Start Errors | ||
|
|
||
| The **Start Error** is the default kind of Boot Error. It is thrown as soon as | ||
| an unmanaged error is detected and caught by the platform. It can occur at any | ||
| moment, as long as your app isn't *running* yet. | ||
|
|
||
| A Start Error makes the deployment fail instantly. Note that the former version | ||
| of your application (if any), keeps running. | ||
|
|
||
| In most cases, a Start Error is caused by a misconfiguration of your | ||
| application, or by some unmanaged error/exception in your application's code. | ||
|
|
||
| ### Fixing Start Errors | ||
|
|
||
| It's very likely that an action on your side is required to fix the issue. The | ||
| deployment logs should help you identify the issue. | ||
|
|
||
| ## Understanding Timeout Errors | ||
|
|
||
| When your application has a [`web` or a `tcp` process type]({% post_url platform/app/2000-01-01-procfile %}#special-process-types), | ||
| the process started in the corresponding container(s) **MUST** bind to the | ||
| provided network port (`PORT` environment variable) within a delay of 60 | ||
| seconds. After this deadline, the platform considers the application has being | ||
| unreachable and throws a **Timeout Error**, causing the deployment to fail. | ||
|
|
||
| - If this situation arises after a restart or a scale operation, the platform | ||
| automatically retries to start your container(s). After 20 unsuccessful | ||
| attempts (with an exponential backoff strategy), the platform gives up. | ||
| Note that your existing containers keep running during this time and after. | ||
|
|
||
| - If you are trying to deploy a new version of an already running application, | ||
| this new deployment is considered a failure but the previous version of your | ||
| application keeps running. | ||
|
|
||
| - Conversely, if this is a very first deployment, the platform does not make | ||
| any attempt to recover from the error. The deployment fails with a | ||
| **timeout-error** status, letting you know that your application didn't | ||
| bind to `PORT` soon enough. | ||
|
|
||
| {% note %} | ||
| A Timeout Error can only occur if you have a `web` or a `tcp` process type, | ||
| which is very likely. | ||
| {% endnote %} | ||
|
|
||
| ### Fixing Timeout Errors | ||
|
|
||
| To fix a Timeout Error, make sure: | ||
| - to bind to the provided network port, by using the `PORT` environment | ||
| variable. | ||
| - to listen on `0.0.0.0` and not on `127.0.0.1`. | ||
| - that your application is starting quickly enough. | ||
|
|
||
| You may need to edit your | ||
| [Procfile]({% post_url platform/app/2000-01-01-procfile %}) to fulfill these | ||
| requirements. | ||
|
|
||
| If your application doesn't need a `web` or `tcp` process type, make sure to | ||
| [scale the unnecessary process type to zero]({% post_url platform/app/2000-01-01-web-less-app %}#deploy-a-web-less-application). | ||
|
|
||
| ## Understanding Hook Errors | ||
|
|
||
| If your application has a [`postdeploy` process type]({% post_url platform/app/2000-01-01-procfile %}#special-process-types), | ||
| the platform can throw a **Hook Error** if the post-deployment process fails. | ||
|
|
||
| - In such a case, the deployment fails with a **hook-error** status. | ||
| - If your application is already running, its code isn't updated and the former | ||
| version keeps running. | ||
|
|
||
| {% note %} | ||
| Hook Errors can only occur if you have a `postdeploy` process type. | ||
| {% endnote %} | ||
|
|
||
| ### Fixing Hook Errors | ||
|
|
||
| Hook Errors are generally caused by an error in your codebase or by some | ||
| misconfiguration. To recover from it, we first advise to investigate the logs | ||
| of your application to understand the root cause. After fixing it, trigger a | ||
| new deployment by pushing your updated code to Scalingo. |
190 changes: 190 additions & 0 deletions
190
src/_posts/platform/app/troubleshooting/2000-01-01-deployment-issues.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,190 @@ | ||
| --- | ||
| title: Deployment Issues | ||
| modified_at: 2026-04-10 00:00:00 | ||
| tags: troubleshooting deployment buildpack build archive image | ||
| index: 2 | ||
| --- | ||
|
|
||
| Deployment Issues happen during the build and packaging phase, before your | ||
| application's containers are started. | ||
|
|
||
| For a broader overview, see [Troubleshooting Your Application]({% post_url | ||
| platform/app/2000-01-01-troubleshooting %}). If your application image is | ||
| built successfully but the application fails to start, see [Boot and Startup | ||
| Errors]({% post_url | ||
| platform/app/troubleshooting/2000-01-01-boot-and-startup-errors %}). | ||
|
|
||
| ## Unknown Technology {#unknown-technology} | ||
|
|
||
| When pushing your app to Scalingo, you might get the following error: | ||
|
|
||
| ```text | ||
| <-- Start deployment of [my-app] --> | ||
| ! We didn't find the type of technology your are using... | ||
| We're sorry this build is failing! | ||
|
|
||
| Refer to the documentation to find out why: | ||
| https://doc.scalingo.com/deployment/unknown-technology | ||
|
|
||
| If you can't find the issue in your application, | ||
| please send us an email at support@scalingo.com | ||
|
|
||
| <3, | ||
| Scalingo | ||
| ! Error deploying the application | ||
| ! → Invalid return code from buildpack | ||
| ``` | ||
|
|
||
| There are two main causes for this problem: the application code is not at the | ||
| root of the repository, or the expected detection files are missing. | ||
|
|
||
| ### Project in a Subdirectory {#project-in-a-subdirectory} | ||
|
|
||
| It may happen that your project is in a subfolder of your Git repository. This | ||
| is supported, but Scalingo's deployment system looks at the root of the Git | ||
| repository by default. | ||
|
|
||
| You need to set the `PROJECT_DIR` environment variable for your application, | ||
| and our build system will automatically look at it. The variable has to target | ||
| a valid directory, otherwise the deployment process will fail. | ||
|
|
||
| **Example** | ||
|
|
||
| If your project has the following architecture: | ||
|
|
||
| ```text | ||
| /server | ||
| /server/server.go | ||
| /server/public/img/logo.png | ||
| /server/public/css/style.css | ||
| /server/public/js/app.js | ||
| /doc | ||
| /doc/api.md | ||
| ``` | ||
|
|
||
| You want to deploy what is in the `/server` directory, so you have to define | ||
| `PROJECT_DIR=server`. | ||
|
|
||
| {% warning %} | ||
| Only the `PROJECT_DIR` directory will be present during runtime. The parent | ||
| directory is not added to the application image we are building during the | ||
| deployment phase. | ||
| {% endwarning %} | ||
|
|
||
| ### Technology Detection | ||
|
|
||
| To detect the technology used by your application, we iterate over the | ||
| technologies alphabetically. If your project contains multiple technologies, we | ||
| will pick the first one detected. | ||
|
|
||
| If you want to skip the detection phase and force the use of a specific | ||
| buildpack, add the environment variable `BUILDPACK_NAME` to your project. | ||
|
|
||
| If you need to use multiple technologies, you can use the | ||
| [multi-buildpacks]({% post_url platform/deployment/buildpacks/2000-01-01-multi %}). | ||
|
|
||
| You can also develop your own buildpack and add the environment variable | ||
| `BUILDPACK_URL` to have complete control on the detection and build phases. | ||
|
|
||
| More information is available on [buildpacks]({% post_url | ||
| platform/deployment/buildpacks/2000-01-01-intro %}) or | ||
| [multi-buildpacks]({% post_url | ||
| platform/deployment/buildpacks/2000-01-01-multi %}). | ||
|
|
||
| Here is how we detect your technology: | ||
|
|
||
| | Technology | Detection | | ||
| | --- | --- | | ||
| | [Ruby]({% post_url languages/ruby/2000-01-01-start %}) | A `Gemfile` should be present at the root of your repository. | | ||
| | [Node.js]({% post_url languages/nodejs/2000-01-01-start %}) | The file `package.json` should be present at the root of the project. | | ||
| | [Meteor]({% post_url languages/meteorjs/2000-01-01-start %}) | The directory `.meteor` should be present at the root of your project. | | ||
| | [PHP]({% post_url languages/php/2000-01-01-start %}) | You need either an `index.php` file or both `composer.json` and `composer.lock` at the root of your project. | | ||
| | [Python]({% post_url languages/python/2000-01-01-start %}) | The file `Pipfile`, `requirements.txt` or `setup.py` must be present at the root of your project. | | ||
| | [Java]({% post_url languages/java/2000-01-01-start %}) | The file `pom.xml` should be present at the root of your project. | | ||
| | [Scala]({% post_url languages/scala/2000-01-01-start %}) | You need at least an `*.sbt` file, a `project/*.scala` file, a `.sbt/*.scala` file, or a `project/build.properties` file. | | ||
| | [Groovy]({% post_url languages/groovy/2000-01-01-start %}) | The `grails-app` directory must be at the root of your project. | | ||
| | [Clojure]({% post_url languages/clojure/2000-01-01-start %}) | The file `project.clj` must be at the root of your project. | | ||
| | [Go]({% post_url languages/go/2000-01-01-start %}) | You need at least one `*.go` file at the root of your project. | | ||
| | [Crystal]({% post_url languages/crystal/2000-01-01-start %}) | The file `shard.yml` should be present at the root of your project. | | ||
| | [Elixir]({% post_url languages/elixir/2000-01-01-start %}) | Create a `.buildpacks` file at the root of your project to declare the Elixir buildpack explicitly. | | ||
|
|
||
| ## Git Submodule {#git-submodule} | ||
|
|
||
| If your project repository uses Git submodules, please be aware that Scalingo | ||
| will not pull them. This Git feature is not supported on the platform for | ||
| different reasons. The main reason is that we currently have no way to | ||
| authenticate the `git pull` operation to a private Git repository during the | ||
| deployment. | ||
|
|
||
| We recommend vendoring a specific release of the code of the sub-repository in | ||
| your main repository before pushing. | ||
|
|
||
| ## Build Errors {#build-errors} | ||
|
|
||
| When your application is deployed, the dependencies are gathered and packaged | ||
| into an application image. | ||
|
|
||
| ### Invalid Return Code From Buildpack | ||
|
|
||
| Your application image is built using a buildpack ([list of buildpacks]({% | ||
| post_url platform/deployment/buildpacks/2000-01-01-intro %})). If the | ||
| buildpack exits with an error, it is probably linked to your project. You | ||
| should be able to see the content of the error in your console, then adapt your | ||
| code or configuration accordingly. | ||
|
|
||
| If you think the error comes from our buildpacks, contact us and we will | ||
| investigate it. | ||
|
|
||
| ### Image Too Large | ||
|
|
||
| The maximal size of an application image is **2 GiB**. If your assets, your | ||
| dependencies and your code weigh more than this limit, different solutions are | ||
| available to lighten the image of your application: | ||
|
|
||
| * Try to remove unused external dependencies or assets. | ||
| * Define a [.slugignore file]({% post_url platform/app/2000-01-01-slugignore %}) | ||
| to exclude files from the image. | ||
|
|
||
| If you absolutely need all these data, please contact us at | ||
| [support@scalingo.com](mailto:support@scalingo.com). | ||
|
|
||
| {% note %} | ||
| Why this quota? Besides being a security limit, this quota is also present to | ||
| preserve the PaaS user experience. A large image results in longer deployments, | ||
| and the instantness aspect is lost. | ||
| {% endnote %} | ||
|
|
||
| ### Archive Too Large | ||
|
|
||
| When deploying an application, the Scalingo build system downloads the source | ||
| code as an archive. The maximum archive size is limited to **300 MB**. | ||
|
|
||
| If your archive exceeds this limit you will get the following error: | ||
|
|
||
| ```text | ||
| Fail to fetch source code: fail to handle tgz: The archive is too heavy (more than 314572800 bytes) | ||
| ``` | ||
|
|
||
| {% note %} | ||
| The limit applies to the **uncompressed** archive. | ||
|
|
||
| For example: given a **200 MB `.tar.gz`** archive, when the underlying `.tar` | ||
| archive is larger than **300 MB**, then you will encounter this limit. | ||
| {% endnote %} | ||
|
|
||
| If you need to deploy a larger archive, please contact us at | ||
| [support@scalingo.com](mailto:support@scalingo.com). | ||
|
|
||
| ## Not Sure This Is Your Case? | ||
|
|
||
| If the build succeeded and the platform is now trying to start your | ||
| application, continue with [Boot and Startup Errors]({% post_url | ||
| platform/app/troubleshooting/2000-01-01-boot-and-startup-errors %}). | ||
|
|
||
| If your issue looks specific to a given language or framework, check the | ||
| technology-specific guides such as [Node.js Common Deployment Errors]({% | ||
| post_url languages/nodejs/2000-01-01-deployment-errors %}). | ||
|
|
||
| If the problem is related to process types, start commands, or the command used | ||
| to boot your application, review the [Procfile]({% post_url | ||
| platform/app/2000-01-01-procfile %}) documentation. |
46 changes: 46 additions & 0 deletions
46
src/_posts/platform/app/troubleshooting/2000-01-01-overview.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| --- | ||
| title: Troubleshooting Your Application | ||
| modified_at: 2026-04-10 00:00:00 | ||
| tags: troubleshooting errors crash deployment | ||
| index: 1 | ||
| --- | ||
|
|
||
| This page provides a summary of common issues you might encounter while deploying or running your application on Scalingo, along with links to more detailed guides. | ||
|
|
||
| ## Deployment Issues | ||
|
|
||
| Deployment issues usually happen during the build and packaging phase, before | ||
| your application's containers are started. | ||
|
|
||
| * **Unknown Technology**: Occurs when Scalingo cannot detect the programming language or framework of your application. | ||
| * **Project in a Subdirectory**: Scalingo looks at the root of the repository unless `PROJECT_DIR` is configured. | ||
| * **Buildpack Failure**: The buildpack exits with an error while preparing the application image. | ||
| * **Image Too Large**: Your application image exceeds the 2 GiB limit. | ||
| * **Archive Too Large**: The source code archive (uncompressed) exceeds the 300 MB limit. | ||
|
|
||
| For more details on how to fix these, see [Deployment Issues]({% post_url | ||
| platform/app/troubleshooting/2000-01-01-deployment-issues %}). | ||
|
|
||
| ## Boot and Startup Errors | ||
|
|
||
| These errors occur when the platform tries to start your application's containers. | ||
|
|
||
| * **Start Errors**: Generic errors during the startup process, often due to misconfiguration. | ||
| * **Timeout Errors**: Your application failed to bind to the assigned `PORT` within 60 seconds. | ||
| * **Hook Errors**: Failure of a `postdeploy` hook script. | ||
|
|
||
| Detailed information and fixes can be found in the [Boot and Startup Errors]({% post_url platform/app/troubleshooting/2000-01-01-boot-and-startup-errors %}) documentation. | ||
|
|
||
| ## Runtime Issues | ||
|
|
||
| Runtime issues happen while your application is already running. | ||
|
|
||
| * **Application Crashes**: Unexpected termination of your application process. | ||
| * **5xx Errors**: Server-side errors that might be related to application crashes or timeouts. | ||
|
|
||
| Learn how to diagnose and recover from these in the [Runtime Issues]({% post_url platform/app/troubleshooting/2000-01-01-runtime-issues %}) guide. | ||
|
|
||
| ## Other Common Problems | ||
|
|
||
| * **SSH Connectivity**: Issues when trying to access your containers via SSH or pushing code. See [Troubleshooting SSH]({% post_url platform/getting-started/2000-01-01-troubleshooting-ssh %}). | ||
| * **Custom Error Pages**: If you want to customize the 502, 503, or 504 error pages displayed to your users, refer to [Custom Error and Maintenance Pages]({% post_url platform/app/2000-01-01-custom-error-page %}). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit puzzled with this PR because we already have this page: https://doc.scalingo.com/platform/app/crash and they seem to overlap a lot.
Maybe we should rather edit the existing one with missing information (if any)?
Maybe we should rename the existing one for it to be more discoverable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this new page is quite useful. It is common troubleshooting with links to other appropriate places. The motivation for the PR is provided in the issue, which is to help our customers find the information and reduce the load on support. @mickael-plassard @CalianasJ WDYT?