> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camposcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Find the cause of an application that is offline, a request that failed or a change that did not apply.

Start with the symptom. Each answer links to the page with the details.

## The application is offline

**1. Read its state**

Call [`GET /v1/apps/{appId}`](https://docs.camposcloud.com/api-reference/endpoint/v1/applications/appId) and look at `status`, `currentResourceMetrics.online`, `suspension` and `shutdownNotice`.

**2. Match what you found**

| You see | It means |
| - | - |
| `status: "suspended"` | The team turned it off. [Read the reason](https://docs.camposcloud.com/guides/why-an-application-stopped.md#suspended-by-the-team). |
| `shutdownNotice` | It sent too many requests to one address. [Fix it and start again](https://docs.camposcloud.com/guides/why-an-application-stopped.md#too-many-requests). |
| `status: "creating"` | Still being prepared. Wait. |
| `status: "error"` | Rebuilding the container failed. Read the logs. |
| `online: false` and none of the above | It was stopped, or your code ended. Check your plan and the logs. |

**3. Check your plan**

When the plan ended, applications and databases are turned off. See [plan ended](https://docs.camposcloud.com/guides/why-an-application-stopped.md#plan-ended).

**4. Read the logs**

Follow [`GET /v1/apps/{appId}/logs`](https://docs.camposcloud.com/api-reference/endpoint/v1/applications/logs) and start the application again. The last lines before it stopped usually show the error of your code.

## A change did not apply

Most changes made with [`update`](https://docs.camposcloud.com/api-reference/endpoint/v1/applications/update) only apply on the next start or restart. Check `restartRequired` in the response: when it is `true`, call [`restart`](https://docs.camposcloud.com/api-reference/endpoint/v1/applications/restart). Databases work the same way for the memory.

## The request failed

Use the HTTP status, not the message, to decide what to do.

| Status | Common causes | What to do |
| - | - | - |
| `400` | A missing field, a field that is not documented, an invalid ID, or an action on an application that is not `active`. | Compare your body with the endpoint page. Applications `creating`, `suspended` or in `error` refuse actions. |
| `401` | The API Key is missing, malformed or was replaced by a newer one. | See [authentication errors](https://docs.camposcloud.com/api-reference/authentication.md#authentication-errors). |
| `403` | The owner has no active plan, the account is suspended, or you lack a team permission. | Check the plan and the [permission](https://docs.camposcloud.com/api-reference/introduction.md#teams-and-permissions) the endpoint lists. |
| `404` | The resource does not exist, or you cannot access it. | Check the ID and that the application belongs to you or to your team. |
| `429` | A [rate limit](https://docs.camposcloud.com/api-reference/api-limits.md) was exceeded. | Wait the seconds in `Retry-After`. |
| `500` | Some predictable cases end here, such as starting an application that is already running. | See the notes on the endpoint page. |
| `503` | No node is available to host a new application. | Try again in a few minutes. |

> [!TIP]
>
> Before starting an application, check `currentResourceMetrics.online`. Starting one that is already running returns `500`.

## The application cannot reach a service

If it works for a while and then stops, you may be hitting the limit of requests to the same address. See [too many requests](https://docs.camposcloud.com/guides/why-an-application-stopped.md#too-many-requests).

To reach your database, use the `host` and `port` in `connection`, and the password you stored. See [databases](https://docs.camposcloud.com/guides/databases.md#connect-your-application).

## Still stuck

Ask on [Discord](https://discord.gg/camposcloud). Tell us the application name, what you called and the status you got, and never send your API Key or the password of a database.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.