Hi We have rudderstack deployed on k8s with multip...
# support
f
Hi We have rudderstack deployed on k8s with multiple instances and using hosted control plane. Although there is enough resources for transformer pods, but they still regularly crash. I also enabled hpa for transformer and it didn't help. I'm monitoring the cluster and all the transformer pods memory and cpu usage are below the
resource request
. Also the node which one of the transformers deployed on have lots of free memory and cpu but still that transformer instance crashes along with others. It's really frustrating and the issue is here for a long time.
this is my value.yml file:
Copy code
transformer:
  replicaCount: 1
  service:
    port: 9090
  image:
    repository: repo-afra.snappfood.dev/rudderlabs/rudder-transformer
    #version: "07042022.165711"
    version: "1.32.0"
    pullPolicy: IfNotPresent
  resources:
    requests:
      memory: "12Gi"
      cpu: "5"
    limits:
      memory: "25Gi"
      cpu: "12"
  extraEnvVars:
    - name: NUM_PROCS
      value: "1"
the exit code:
Copy code
Sent kill signal to worker 1 (pid: 25)
SIGTERM signal received in the worker
Process exit event received
Redis client disconnected
Worker (pid: 25) was gracefully shutdown
Process info:  {
  pid: 25,
  ppid: 18,
  mem: {
    rss: 291860480,
    heapTotal: 222433280,
    heapUsed: 147714512,
    external: 4019471,
    arrayBuffers: 1796080
  },
  cpu: { user: 32214003, system: 5584957 },
  cmd: '/usr/local/bin/node /usr/local/bin/node /home/node/app/dist/src/index.js'
}
Just to add, I have multiple services on my k8s, and other services don't have any issue related to resources or k8s cluster.
The hpa manifest:
Copy code
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
 name: hpa-rudderstack-transformer-deployment
spec:
 scaleTargetRef:
   apiVersion: apps/v1
   kind: Deployment
   name: rudderstack-transformer
 minReplicas: 1
 maxReplicas: 10
 targetCPUUtilizationPercentage: 50
I have changed
NUM_PROCS
value to 5, for now it's working fine.
g
Oh, this is not resolved yet? Let me discuss with the team
c
@fancy-answer-79663 Configure low resources for a transformer pod & enable hpa to handle volume spike. If you see any further issues, try out this configuration
1Gi memory & 600m cpu with 1 NUM_PROC
*hpa with high replica count (according to the current configuration you shared, 120 maxReplicas can be supported with the above pod configuration)
g
Discussed with Javad. After setting NUM_PROCS to 5, it seems to work OK fo them.
👍 1