Skip to content

MemoryCritical (Codey)

Severity critical
Fires when Memory usage is above 85% of the limit for 2 hours
General runbook MemoryCritical

Follow the steps in the general runbook first. This page adds the steps for Codey.

For Codey, the alert and the Memory column in the Pods table both use the working set, so they show the same value.

What a restart means for your users

Codey keeps the login sessions of your users in memory. When Codey restarts (for example when it reaches the memory limit, or after a compute plan change), all users are logged out and must log in again. Git operations over HTTPS or SSH that run during the restart fail, and must be started again.

Reduce the memory usage

  • Automated jobs: many parallel clones, pushes or fetches at the same time use a lot of memory. Check if an automated job (for example a CI system, a mirror, or a backup script) causes the load. Reduce how often it runs, or how many jobs run at the same time.
  • Repository imports: importing or migrating large repositories can use a lot of memory while the import runs. Import large repositories one after the other.
  • Code search: Codey builds a search index for the code of each repository. Building the index can use a lot of resources, mostly when a repository is indexed for the first time. After you add or import many or large repositories, the memory usage can be higher for some time.

If the memory usage is expected for your number of users and repositories, move the instance to a larger compute plan. See Scaling.