Gyro Containers: logs, CPU/memory graphs and warnings
1. Logs
Every line your application writes to standard output (stdout) and standard error (stderr) is logged. Logs written to files are not visible; configure your application to log to the console.
- Logs are kept for 14 days.
- Lines show the instance (replica) name; node names or infrastructure details are not shown.
2. Viewing logs
- Open the Logs page of your environment.
- Choose the Service.
- Choose the Time range (for example the last hour; up to 7 days).
- Optionally type a word in the Text filter box (only lines containing that text appear; it is plain text, not a regular expression).
- Press Refresh. Lines are ordered from oldest to newest.
Previous instance: If a service crashes and restarts, the new instance's log is often empty. With the Previous instance option you see the log of the last crashed instance; the cause of the failure is usually there.
gyro container logs 12345 api --since-minutes 120 --filter "ERROR"
gyro container logs 12345 api --previous 1 # the crashed previous instance
3. CPU and memory graphs
The service page has Last 24 hours graphs:
- CPU (vCPU): CPU used. If it approaches the reserved amount (the limit) the application slows down.
- Memory (MB): memory used. If it reaches the limit the container is stopped (OOMKilled) and restarts.
- Restarts: if the counter keeps rising the application is crashing.
The Now: line at the top shows current use and the limit (for example 0.12 / 0.25 vCPU · 140 / 256 MB). For new services graph data appears after a few minutes ("No graph data yet").
gyro container metrics 12345 api --hours 24
4. Warnings (events)
The header of your environment has Latest warnings: the last 50 platform warnings such as image pull errors, crashes and lack of capacity. Warnings are simplified so they do not include infrastructure names.
gyro container events 12345
The status label in the service table and the explanation under the row also summarise the problem (Common errors).
5. Frequently asked questions
My logs do not appear; what should I do?
Your application may be writing to a file; write to stdout/stderr. Also, if the service never started (for example the image could not be pulled) there is no log; look at Latest warnings.
Can I export the logs?
For now you can filter and copy them from the panel or fetch them with gyro container logs (there is a line limit). For long-term archives send logs from your application to your own log service.
Can I set up alerts?
For external monitoring of your service you can use Uptime Monitoring; it watches your address and sends email/SMS on downtime.
Why is memory filling up?
There may be a memory leak or the reserved size (default 256 MB) may be small. Increase the size and publish a new revision (Scaling and updating).
Next step
Thanks for your feedback!