Sourcegraph DocsSourcegraph Docs
  • Code Intelligence

    • Cody
    • Code Search
  • Code Management

    • Batch Changes
    • Code Monitoring
    • Code Ownership
    • Code Insights
    • Notebooks
  • Platform

    • Sourcegraph Admin
    • Sourcegraph Cloud
    • Integrations
  • CLI & API

    • Sourcegraph & Cody CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • How to videos
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
    • Technical changelog
    • Releases
  1. Docs
  2. admin
  3. how-to
  4. troubleshoot-pod-eviction

How to troubleshoot pod evictions in Sourcegraph Kubernetes deployments

This document will take you through how to solve for pod eviction that can cause data loss in ephemeral storage.

This document will take you step-by-step through the tasks required to perform troubleshooting to understand why this occurrence took place and eventually solve for it.

Prerequisites

This document assumes that you have deployed Sourcegraph on Kubernetes and you are a site admin for your organization.

Steps to troubleshoot

  1. Run kubectl describe pod $EVICTEDPOD
  2. Check the Message object
  3. If the error is: Pod ephemeral local storage usage exceeds the total limit of containers xGi.
  4. Check on the: ephemeral-storage Limits and Requests, for example ephemeral-storage: xGi. Also, check the cache size for the pod where$PODNAME_CACHE_SIZE_MB>:x0000, (x is an integer).
  5. In the $PODNAME.Deployment.yaml, raise the ephemeral-storage figures to a preferred storage size for your node and set the CACHE_SIZE_MB to a size lower than the ephemeral storage limit.
  6. Enable auto scaling by increasing the number of replicas(if preferred)

Further resources

  • Sourcegraph - Alert solutions
  • Kubernetes Eviction docs

On this page

  1. How to troubleshoot pod evictions in Sourcegraph Kubernetes deployments

    1. Prerequisites
    1. Steps to troubleshoot
    1. Further resources

Edit this page on GitHub
Questions? Give us feedback