Skip to content
0850 554 5439 [email protected]

How can we help?

Search our guides and tutorials, or browse the categories below.

Gyro Containers: logs, CPU/memory graphs and warnings

Gyro Containers (ECS) 10 views Step-by-step guide Last verified: Markdown
What you will learnHow to read and filter your service's logs, how to see the last log of a crashed instance, the CPU/memory graphs and environment warnings.
Time7 minutes
Who this is forDevelopers monitoring and troubleshooting a service.
What you needA running service, or one that is trying to run.

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

  1. Open the Logs page of your environment.
  2. Choose the Service.
  3. Choose the Time range (for example the last hour; up to 7 days).
  4. Optionally type a word in the Text filter box (only lines containing that text appear; it is plain text, not a regular expression).
  5. 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.

bash
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").

bash
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.

bash
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

Was this helpful?

Thanks for your feedback!

Still Need Help?

Our support team is here around the clock for anything you can't find above.