Deploys, statuses and logs¶
Deploy¶
Deploy creates a new deployment: BotBarn fetches your code, builds an image and starts a container. The previous deployment of the bot is stopped. Deploy again whenever you change the code, the source or the variables.
The Deployments tab lists every deployment, newest first.
Statuses¶
| Status | Meaning |
|---|---|
| Queued | Waiting for the runner to pick it up, usually a few seconds. |
| Building | Fetching the code and building the image. |
| Starting | The container started. BotBarn watches it for 15 seconds. |
| Running | The bot has been up for 15 seconds. |
| Restarting | The bot exited after it was running; BotBarn is starting it again. |
| Stopping / Stopped | You stopped it, its plan ended, or a newer deployment replaced it. |
| Failed | The build failed, the bot exited during startup, or it crashed too many times. The reason is on the Overview and in Logs. |
Crashes and automatic restarts¶
- A bot that exits within 15 seconds of starting is marked Failed with Bot exited during startup (exit code N). It is not restarted: something is wrong with the code or its settings. Read the log.
- A bot that exits later is restarted automatically, up to 5 times. The sixth crash marks it Failed with Bot crashed 6 times.
- Once the bot reaches Running after a restart, the count goes back to 0.
Stop, start and restart¶
| Action | What happens |
|---|---|
| Stop | Stops the container. The bot stays off until you start it. |
| Start | Starts a stopped deployment again: same code, current variables, restart count reset. |
| Restart | Restarts the running container: same code, same variables, same /data. |
| Deploy | New code, new image, current variables. |
Start, Restart and Deploy need an active plan. Stop always works.
Logs¶
The Logs tab shows:
- the build log of the deployment: the generated or used Containerfile and the build output;
- the bot log: the last 200 lines your bot printed to standard output and standard error, refreshed while it runs.
Values of your variables are shown as ***.
Tips:
- Print to standard output. In Python, BotBarn runs your code unbuffered; with your own Containerfile
set
PYTHONUNBUFFERED=1or log withflush=True. - Log one line per event, with the error message. A crash's last lines are the most useful ones.
Data¶
Files your bot writes in /data are kept across restarts and deploys; files written anywhere else
(/tmp, /var/tmp) are lost when the container restarts. /data is sized by the plan and is deleted with the
bot and 7 days after the plan ends. Download or reset it from the Data card of the bot's Overview or with your
AI assistant. A reset stops the bot, empties /data and starts it again.