Skip to content

Reference

The 30 failure patterns

When Kiyesi names an incident's likely source, it matches the incident against these patterns and shows the one that fits, with your team's own note from an earlier fix first. The words here come from the same file the service uses.

A pattern is suggested only when a source is named. When the evidence is mixed, Kiyesi suggests no fix rather than point at the wrong one. See Handle an incident.

Deployment

Errors that start right after a deploy

What happened. A new version of the app went out, and errors began within minutes of it.

Why it usually happens. The new code has a fault the tests did not catch, or it depends on something the server does not have yet.

Fix. Roll back to the last version without the errors, then correct the code and release again.

Terminal window
IMAGE_TAG={previous_version} docker compose up -d {app}

For a client. The fault came with an update we released shortly before. We are putting the previous version back, which removes the fault, and will release a corrected update once it has been tested.

The app will not start after a deploy

What happened. After a new version went out, the app keeps stopping as soon as it starts.

Why it usually happens. The new image fails at start-up, often a missing file, a wrong start command or a dependency that was not installed.

Fix. Read the app's last lines before each restart, then roll back until the image starts cleanly.

Terminal window
docker logs --tail 50 {container}

For a client. An update we released shortly before does not start correctly. We are putting the previous version back, which brings the service up again, and will correct the update before releasing it again.

A setting is missing after a deploy

What happened. The new version expects a setting or environment variable the server does not have.

Why it usually happens. A setting was added in the code or on the developer's machine, but not to the server's environment file.

Fix. Add the missing setting to the server's environment file and restart the app, or roll back.

Terminal window
docker compose up -d {app}

For a client. An update we released shortly before needs a setting that was not yet in place. We are adding it, or putting the previous version back, whichever is quicker.

The database does not match the new code

What happened. The new version asks the database for a table or column that is not there.

Why it usually happens. The migration that adds it did not run, or ran against another database.

Fix. Run the release's database migration, or roll back to the version that matches the database.

For a client. An update we released shortly before expected a change to our stored data that had not been made yet. We are completing that change, or putting the previous version back, whichever is quicker. No data is lost.

Server

A process killed for using too much memory

What happened. The system stopped a process because the server or its container ran out of memory.

Why it usually happens. Usage grew past the memory the server or the container's limit allows, often after a spike in traffic or a leak.

Fix. Find what grew in the Metrics screen, then raise the limit, add memory, or fix the leak.

Terminal window
docker stats --no-stream

For a client. One of our servers ran out of working memory, so part of the service stopped. We are giving it more room and finding what used it up, so it does not happen again.

A disk is full

What happened. A disk on the server filled up, so programs could no longer write to it.

Why it usually happens. Logs, old images, backups or uploads grew with nothing removing them.

Fix. Free space now, then set log rotation or a clean-up so it does not fill again.

Terminal window
sudo du -xh {mount} --max-depth=2 | sort -h | tail -20

For a client. One of our servers ran out of storage space, so the service could not save what it needed to. We are freeing space and making sure it cannot fill up again.

The server's CPU is saturated

What happened. The server's processors were busy all the time, so requests waited their turn.

Why it usually happens. More traffic than the server can serve, a runaway process, or a heavy job at the wrong time.

Fix. Find the busiest process, then move heavy jobs out of busy hours or give the server more CPU.

Terminal window
top -b -n 1 | head -20

For a client. One of our servers was overloaded, so requests had to wait. We are spreading the work out and adding capacity where it is needed.

The server stopped reporting

What happened. The server stopped sending its figures, so it may be down or cut off.

Why it usually happens. The server crashed or restarted, ran out of memory, or lost its network connection.

Fix. Check the server is running at your provider, then check the network and the kiyesi service.

Terminal window
sudo systemctl status kiyesi && journalctl -u kiyesi -n 20

For a client. One of our servers stopped responding. We are checking it with our hosting provider and bringing it back.

Too many open files

What happened. A program reached its limit of open files and connections, so new ones failed.

Why it usually happens. The limit is set low, or the app opens files or connections and does not close them.

Fix. Raise the open-file limit for the app, and check it closes connections it no longer needs.

For a client. Part of the service reached a limit on how many connections it can handle at once. We are raising the limit and making sure connections are released properly.

The server is swapping heavily

What happened. Memory ran short, so the server moved memory to disk and everything slowed down.

Why it usually happens. The programs on the server need more memory than it has.

Fix. Find which container uses the most memory, then lower it or add memory to the server.

Terminal window
docker stats --no-stream

For a client. One of our servers was short of working memory, which slowed everything on it down. We are freeing memory and adding more where it is needed.

Backend app

The app crashes with an error

What happened. The app hit an error it did not handle, and failed requests or stopped.

Why it usually happens. A fault in the code, often an input the code did not expect.

Fix. Read the stack trace in Logs, correct the code at the line it names, and release again.

For a client. Part of our service ran into an error in its own code. We are correcting the code and will release the fix as soon as it has been tested.

Server errors from the app

What happened. The app answered with server errors (5xx) while the server and database were healthy.

Why it usually happens. A fault in the code for these requests, or a bad input it does not handle.

Fix. Open the failing requests in Traces and the app's errors in Logs, then correct the code.

For a client. Part of our service is returning errors, while the rest works normally. We have found where it fails and are correcting it.

The app ran out of its own memory

What happened. The app reached its own memory limit, such as Node's heap limit, and stopped.

Why it usually happens. The app holds too much in memory, often a large result loaded at once, or a leak.

Fix. Load large results in pages, find what keeps growing, or raise the app's memory limit.

For a client. Part of our service used up the memory set aside for it and stopped. We are restarting it with more room and correcting what used the memory up.

The web server cannot reach the app

What happened. The web server answered 502 because the app behind it did not answer.

Why it usually happens. The app is stopped, restarting, or listening on another port than the web server expects.

Fix. Check the app is running and listening where the web server sends requests.

Terminal window
docker ps -a --filter name={app}

For a client. Our service stopped answering requests. We are restarting it and checking why it stopped.

The app takes too long to answer

What happened. The web server gave up waiting for the app and answered 504.

Why it usually happens. The app is busy, stuck waiting on something slow, or doing too much work per request.

Fix. Open the slow requests in Traces to see where the time goes, then make that step faster.

For a client. Our service became too slow to answer some requests in time. We have found the slow step and are making it faster.

One container uses all its CPU

What happened. One container used all the CPU it could, and its requests slowed or failed.

Why it usually happens. A loop that does not end, heavy work in the request path, or more traffic than one process can serve.

Fix. Find what the container was doing, move heavy work to a background job, or run more copies.

Terminal window
docker stats --no-stream {container}

For a client. Part of our service was overloaded, so its requests slowed down or failed. We are moving the heavy work out of the way and adding capacity.

Database

The database refuses connections

What happened. The app could not connect to its database.

Why it usually happens. The database stopped, restarted, or is not reachable on the address the app uses.

Fix. Check the database is running and reachable from the app, then restart it if it stopped.

For a client. Our service could not reach its database. Your data is safe. We are bringing the connection back.

Too many database connections

What happened. The database or the app's connection pool ran out of connections, so requests waited or failed.

Why it usually happens. Connections are opened and not returned, the pool is too small for the traffic, or slow queries hold them.

Fix. Check the app returns its connections, size the pool to the database's limit, and fix slow queries.

For a client. Our database reached its limit of connections at once, so some requests had to wait or failed. We are freeing connections and raising the limit.

Slow database queries

What happened. Queries took a long time, so the requests waiting on them were slow.

Why it usually happens. A query reads far more rows than it needs, usually for want of an index, or the tables grew.

Fix. Find the slowest query in Logs, add the index it needs, or read less at once.

For a client. Our database became slow to answer, so pages that rely on it were slow. We are speeding up the slow parts.

The database's disk is full

What happened. The database could not write, because its disk is full or it switched to read-only.

Why it usually happens. Data, logs or backups grew until the disk filled.

Fix. Free space on the database's disk, then plan for growth before it fills again.

For a client. Our database ran out of storage space, so new information could not be saved. Your existing data is safe. We are adding space now.

Queries waiting on each other

What happened. Queries waited for each other's locks, or the database stopped some to break a deadlock.

Why it usually happens. Long transactions, or two code paths that change the same rows in a different order.

Fix. Keep transactions short, and change rows in the same order everywhere.

For a client. Some requests to our database got in each other's way, so they were slow or failed. We are clearing them and changing how they run so it does not repeat.

The cache cannot be reached

What happened. The app could not reach Redis or Valkey.

Why it usually happens. The cache stopped, ran out of memory, or is not reachable on the address the app uses.

Fix. Check the cache is running and has memory to spare, then restart it if it stopped.

For a client. Part of our service that keeps things quick to load stopped responding. Your data is safe. We are bringing it back.

Outside service

The payment provider is failing

What happened. Calls to the payment provider timed out or failed.

Why it usually happens. The provider is having trouble, or the server cannot reach it.

Fix. Check the provider's status page, and show customers a clear message until it recovers.

For a client. The company that processes our payments is having problems, so some payments could not be completed. No money was taken for a payment that did not go through. We are watching their recovery and will tell you when payments work again.

The email or SMS provider is failing

What happened. Calls to the email or SMS provider timed out or failed, so messages are late or missing.

Why it usually happens. The provider is having trouble, a sending limit was reached, or its key expired.

Fix. Check the provider's status page and your account's limits, then send the waiting messages again.

For a client. The company that sends our emails and text messages is having problems, so some messages are late. We will send the waiting messages once they recover.

Names cannot be looked up

What happened. The server could not look up the address of a service it calls.

Why it usually happens. The server's name servers are failing, or the service's name changed or expired.

Fix. Check the server can look up the name, then fix its name servers or the address the app uses.

Terminal window
getent hosts example.com

For a client. Our service could not find one of the outside services it relies on, because of an internet addressing problem. We are correcting the address it uses.

A certificate error calling another service

What happened. The server refused to talk to a service because its certificate did not check out.

Why it usually happens. The service's certificate expired, or the server's list of trusted certificates is out of date.

Fix. Check the service's certificate, and update the server's trusted certificates.

Terminal window
sudo apt-get install --only-upgrade ca-certificates

For a client. Our service stopped trusting one of the outside services it relies on, because a security certificate did not check out. We are updating it so the connection is secure again.

Frontend

Frontend error that starts right after a deploy

What happened. A new frontend version introduced an error in the browser.

Why it usually happens. The new code reads a value that is missing for some users, or the frontend went out before a backend change it depends on.

Fix. Roll back to the last version without the error, then correct the code and release again.

Terminal window
IMAGE_TAG={previous_version} docker compose up -d {app}

For a client. The fault is in an update to the website itself, released shortly before. Our servers and data are not affected. We are putting the previous version back, which removes the fault, and will release a corrected update once it has been tested.

Part of the page failed to load

What happened. Browsers could not load a part of the page's code.

Why it usually happens. A release removed files that pages already open still ask for, or a network or cache problem.

Fix. Keep the previous release's files available for a day after each release.

For a client. Part of our website did not load in some browsers, often just after an update. We are making sure every part of the site is always available.

Errors in one browser only

What happened. The errors happen in one browser only.

Why it usually happens. The code uses a feature that browser does not support, or behaves differently there.

Fix. Reproduce it in that browser, then add a fallback or avoid that feature.

For a client. The website fails in one web browser only. Other browsers work normally. We are correcting it for that browser.

Browsers sending bad requests

What happened. Browsers sent many requests the backend refused (4xx), while it answered correct ones normally.

Why it usually happens. The frontend sends requests the backend does not accept, often after one side changed.

Fix. Compare what the frontend sends with what the backend expects, and release them together.

For a client. The website and our service stopped agreeing on how to talk to each other, so some actions failed. We are bringing them back in line.