Why does the Xray Helm chart DB sync get stuck?

Why does the Xray Helm chart DB sync get stuck?

AuthorFullName__c
Nimer Bsoul
articleNumber
000004496
ft:sourceType
Salesforce
FirstPublishedDate
2019-06-24T10:46:59Z
lastModifiedDate
2021-05-25
VersionNumber
7

JFrog's Helm Charts project offer a variety of Xray on Kubernetes deployment options, including different values and resources for Xray services and its third-party software (PostgreSQL and MongoDB).

To work properly and operate efficiently, during XRay's initialization process, it must execute a full database sync. For the sync to progress smoothly, your MongoDB must have sufficient resources available to it. Otherwise, the MongoDB server pod will not be able to function as it should and might even freeze (which might necessitate a restart of your MongoDB and Xray server pods). By default and per the official MongoDB chart, XRay's MongoDB sets itself up with the following resources values:

 

resources:
requests:
    memory: 256Mi
    cpu: 100m

mongodbExtraFlags:
- "--wiredTigerCacheSizeGB=1"


Note: The values above are insufficient to achieve successful DB syncing and, therefore, must be
modified to the following values:
 

resources:
  requests:
        memory: "6Gi"
        cpu: "2"
  limits:
        memory: "6Gi"
        cpu: "2"
mongodbExtraFlags:
- "--wiredTigerCacheSizeGB=3"


These values can be added by:
 

  1. Creating a mongodb-values.yaml file with the new values.
  2. Upgrading the Helm chart: helm upgrade <helm_release_name> --install jfrog/xray -f mongodb-values.yaml