Troubleshooting
Copy page
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.
A build fails
Section titled “A build fails”grayspar deploy prints the end of the build log and the command that shows the rest:
grayspar logs --buildThe 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.
The deploy says a folder can’t start
Section titled “The deploy says a folder can’t start”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.
The service isn’t answering on its port
Section titled “The service isn’t answering on its port”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
PORTvariable, or setPORTto the port your app uses withgrayspar env set PORT=3000. - The app listens on
localhostalone. Listen on0.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.
The app crashes while starting
Section titled “The app crashes while starting”This version crashed while starting.The app exited soon after it started. To read what it printed before it stopped, run:
grayspar logsA missing variable is a common cause. Compare the variables your app reads with the list grayspar env prints.
A variable from .env wasn’t sent
Section titled “A variable from .env wasn’t sent”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:
grayspar env set DATABASE_URL=postgres://db.example.com/<database-name>A Dockerfile can’t find its files
Section titled “A Dockerfile can’t find its files”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:
grayspar deploy --dockerfile api=docker/api.DockerfileA volume is full
Section titled “A volume is full”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.
Someone can’t open the project
Section titled “Someone can’t open the project”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.
A webhook never reaches the app
Section titled “A webhook never reaches the app”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:
grayspar open-path add /webhooksRequests answer 429 Too Many Requests
Section titled “Requests answer 429 Too Many Requests”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.