Skip to content
Dashboard

Troubleshooting

Copy page
View as Markdown

Each section starts with what you see, then explains the cause and the fix. When a deploy fails, the version already running stays live, so you can fix the cause and deploy again.

grayspar deploy prints the end of the build log and the command that shows the rest:

Terminal window
grayspar logs --build

The log names the step that failed, such as a missing dependency or a command your build script runs. Fix the step in your code and deploy again. If the log says the build stopped because of an internal error, nothing in your code caused it, and deploying again usually succeeds.

Terminal window
Nothing in api says how to start it.

Grayspar couldn’t find a start command for the folder. Add a Procfile that names the command, as Start command and port shows.

Terminal window
This service isn't answering on port 8080. If it uses another port, set PORT to that port.

The app started but never answered on the port Grayspar gave it. Two causes cover almost every case:

  • The app listens on another port. Read the port from the PORT variable, or set PORT to the port your app uses with grayspar env set PORT=3000.
  • The app listens on localhost alone. Listen on 0.0.0.0, so requests from outside the service reach it.

A background worker that takes no requests needs no port. Give it no path, as Services and paths describes.

Requests to a service at a path answer 404

Section titled “Requests to a service at a path answer 404”

A service at a path receives each request with that path, so a backend at /api receives /api/<route>. A backend written behind a dev proxy that removed /api, as Vite’s rewrite option does, has no route for it. Mount the backend’s routes under /api, as Services and paths describes.

Terminal window
This version crashed while starting.

The app exited soon after it started. To read what it printed before it stopped, run:

Terminal window
grayspar logs

A missing variable is a common cause. Compare the variables your app reads with the list grayspar env prints.

A value that points at localhost or 127.0.0.1 stays on your computer, because a server can’t reach your computer. The CLI names each variable it left out. Set its production value with a command:

Terminal window
grayspar env set DATABASE_URL=postgres://db.example.com/<database-name>

A Dockerfile meant to be built from the root of the repository fails when Grayspar builds it from its own folder, because the files it copies sit elsewhere. Name the Dockerfile once with --dockerfile, and Grayspar builds it from the root:

Terminal window
grayspar deploy --dockerfile api=docker/api.Dockerfile

When a volume fills and your plan has no storage left for it to grow, the team’s owners get an email saying which volume is full. Remove a volume nobody needs with grayspar volume remove, or delete files your app no longer needs.

A person who sees a page saying the project is private either isn’t on the list, or logged in with a different address than the one you added. Run grayspar access to check the list. The page lets the person switch accounts or ask the owners for access.

Services such as Stripe and GitHub can’t log in, so a private project turns their requests away. Add the path they call as an open path:

Terminal window
grayspar open-path add /webhooks

Grayspar answers 429 when one address sends a project more than a burst of 500 requests, then more than 50 a second. The Retry-After header says how many seconds to wait. A person opening the app never comes near it, but a script or a load test can, so pace it below 50 requests a second.

The CLI asks a question an agent can’t answer

Section titled “The CLI asks a question an agent can’t answer”

Without a terminal, the CLI turns each question into a refusal that names the flag answering it, such as --yes or --path. Add the flag and run the command again. Grayspar for agents shows what a refusal looks like.