Destination, orchestrator, and source pod all stuck in terminating

  • Is this your first time deploying Airbyte?: No

  • OS Version / Instance: EKS

  • Memory / Disk: m2.2xlg

  • Deployment: K8

  • Airbyte Version: 0.44.20

  • Source name/version: Any sources

  • Destination name/version: S3

  • Step: Scheduled syncs resulted in this error.

  • Description: Syncs were happening fine for the last week. All of a sudden the syncs started to error. I took a look into kubernetes and noticed that the pods for the destination, orchestrator replication, and source pods were all terminating. Because the pods for those connections were stuck in terminating, future scheduled jobs continued to fail.

Attached is an image of the terminating pods and the logs for 66221.
66221_logs.txt (75.7 KB)

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
Best,
The Community Assistance Team

How do you deployed Airbyte in kubernetes?

We deployed it following the guide here.

We are using “kube/overlays/stable-with-resource-limits/set-resource-limits.yaml” with a “parallelize-worker.yaml” where the replica is set to 2. All of our airbyte data is being piped to s3 and the logs are also pushed to s3 as well to a different bucket. We use an external RDS instance for airbyte.

Additionally, the k8 is deployed using aws cdk with the following settings:

// Create K8 node group
    const multipartUserData = new ec2.MultipartUserData();
    const userData = ec2.UserData.forLinux();
    multipartUserData.addUserDataPart(
      userData,
      ec2.MultipartBody.SHELL_SCRIPT,
      true
    );
    multipartUserData.addCommands(
      'set -o xtrace',
      // NOTE: Dead containers can starve our nodes of
      // resources. The commands ensures garbage collection
      // of dead containers.
      `/etc/eks/bootstrap.sh --kubelet-extra-args '--image-gc-high-threshold="85" --image-gc-low-threshold="80" --maximum-dead-containers=1 --eviction-hard=memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%,imagefs.available<25%'`

    );
    const lt = new ec2.CfnLaunchTemplate(this, 'LaunchTemplate', {
      launchTemplateData: {
        instanceType: 'm5.2xlarge',
        userData: cdk.Fn.base64(multipartUserData.render()),
      },
    });

    // Create K8 cluster
    const cluster = new eks.Cluster(this, 'k8cl', {
      clusterName: 'airbyte-cluster',
      version: eks.KubernetesVersion.V1_21,
      defaultCapacity: 0,
    });
    cluster.addNodegroupCapacity('default-nodegroup', {
      launchTemplateSpec: {
        id: lt.ref,
        version: lt.attrLatestVersionNumber,
      },
      minSize: 2,
      desiredSize: 2,
      maxSize: 3,
    });

It appears the issue is very similar to this: Completed Pod not getting cleaned after failed sync or success · Issue #16589 · airbytehq/airbyte · GitHub

Is there a way for me to configure a history limit on the pods spun up by the airbyte-worker?

Did you check Sunny comment in the issue? The pod-sweeper will clean every two hour the stale pods.

We reduced it down to every 30 seconds and it has fixed the issue. Do you know if there’s a way for us to define successfulJobsHistoryLimit and failedJobsHistoryLimit for these jobs? Not ideal that we are relying on a sweeper that runs periodically as opposed to enforcing it at the infra level in terms of max jobs retained. Reference here: Running Automated Tasks with a CronJob | Kubernetes

I don’t think it’s possible because Airbyte doesn’t use cronJobs to launch the connectors.

Thanks Marco. Are there any suggestions other than pod sweeper? Mainly worried that if we have a high volume of syncs then we can run into the same issue.

Unfortunately the option Airbyte uses is pod-sweeper. You can create custom script in Kubernetes to handle whevener you want to achieve but is a cstomization.