plex upgrade error: Limit must be set for non overcommitable resources

dirtyfreebooter

Explorer
Joined
Oct 3, 2020
Messages
72
every time i try and upgrade plex i get this:
Code:
Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 426, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 461, in __run_body
    rv = await self.method(*([self] + args))
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1186, in nf
    res = await f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1318, in nf
    return await func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 553, in do_update
    await self.middleware.call('chart.release.helm_action', chart_release, chart_path, config, 'update')
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1386, in call
    return await self._call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1346, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1249, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/helm.py", line 44, in helm_action
    raise CallError(f'Failed to {tn_action} chart release: {stderr.decode()}')
middlewared.service_exception.CallError: [EFAULT] Failed to update chart release: Error: UPGRADE FAILED: cannot patch "plex" with kind Deployment: Deployment.apps "plex" is invalid: spec.template.spec.containers[0].resources.limits: Required value: Limit must be set for non overcommitable resources


i have no clue what that means. anyone have any idea? thanks
 

omeganot

Dabbler
Joined
Feb 25, 2023
Messages
20
Seems to be related to issues with limit resources in Kubernetes from the latest update.


Could be that if you have numerous pools you can unset, move, and move back after numerous restarts to get it back. Kinda janky, but it's worked for some. I'm not there yet.
 

ShaggyKris

Dabbler
Joined
Apr 21, 2023
Messages
12
I have this exact same issue. I was able to get rid of it by disabling GPU support (seems to be something to do with allocating my iGPU), but that is a temporary gimped workaround.

I've gone so far as trying to deploy a whole new app with nothing set, and it still gives the error. I have no other apps mapped to the GPU, so I don't know what's going on.
 

ncw1978

Dabbler
Joined
Sep 22, 2022
Messages
19
Yeah struggling to get plex back working which is very annoying getting the same messages
 

ShaggyKris

Dabbler
Joined
Apr 21, 2023
Messages
12
I ended up installing the TrueCharts version in the meantime, which I'm not too jazzed about as it requires me to set up port forwarding on my router. By getting the deployment from k3s, I saw the following:

Code:
root@truenas[/home/admin]# k3s kubectl get deployment plex -o yaml --namespace=ix-plex
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "4"
    meta.helm.sh/release-name: plex
    meta.helm.sh/release-namespace: ix-plex
  creationTimestamp: "2023-04-21T14:18:33Z"
  generation: 4
  labels:
    app.kubernetes.io/instance: plex
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: plex
  name: plex
  namespace: ix-plex
  resourceVersion: "2242341"
  uid: 03631c61-0d43-45b7-9daf-beb51cd058c8
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: plex
      app.kubernetes.io/name: plex
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        rollme: c2WgS
      creationTimestamp: null
      labels:
        app.kubernetes.io/instance: plex
        app.kubernetes.io/name: plex
      name: plex
    spec:
      containers:
      - env:
        - name: KUBE_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: POD_IP
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: status.podIP
        - name: TZ
          value: America/Halifax
        - name: PLEX_CLAIM
        - name: PMS_INTERNAL_ADDRESS
          value: http://plex:32400
        - name: PMS_IMAGE
          value: plexinc/pms-docker:1.32.0.6973-a787c5a8e
        image: plexinc/pms-docker:1.32.0.6973-a787c5a8e
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 5
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          tcpSocket:
            port: 32400
          timeoutSeconds: 5
        name: plex
        ports:
        - containerPort: 32400
          hostPort: 32400
          name: pms
          protocol: TCP
        - containerPort: 32469
          hostPort: 32469
          name: plex-dlna
          protocol: TCP
        - containerPort: 1900
          hostPort: 1900
          name: plex-dlna-udp
          protocol: UDP
        - containerPort: 32410
          hostPort: 32410
          name: plex-gdm1
          protocol: UDP
        - containerPort: 32412
          hostPort: 32412
          name: plex-gdm2
          protocol: UDP
        - containerPort: 32413
          hostPort: 32413
          name: plex-gdm3
          protocol: UDP
        - containerPort: 32414
          hostPort: 32414
          name: plex-gdm4
          protocol: UDP
        readinessProbe:
          failureThreshold: 5
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 2
          tcpSocket:
            port: 32400
          timeoutSeconds: 5
        resources: {}
        startupProbe:
          failureThreshold: 60
          initialDelaySeconds: 10
          periodSeconds: 5
          successThreshold: 1
          tcpSocket:
            port: 32400
          timeoutSeconds: 2
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /config
          name: config
        - mountPath: /data
          name: data
        - mountPath: /shared
          name: shared
        - mountPath: /config/Library/Application Support/Plex Media Server/Logs
          name: shared-logs
        - mountPath: /transcode
          name: transcode
        - mountPath: /plex_media/tv_shows
          name: extrappvolume-0
        - mountPath: /plex_media/movies
          name: extrappvolume-1
        - mountPath: /plex_media_temp
          name: extrappvolume-2
      dnsConfig: {}
      dnsPolicy: ClusterFirstWithHostNet
      hostNetwork: true
      hostname: plex
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - hostPath:
          path: /mnt/NAS/AppData/Plex
          type: ""
        name: config
      - hostPath:
          path: /mnt/NAS/AppData/Plex
          type: ""
        name: data
      - emptyDir: {}
        name: shared
      - emptyDir: {}
        name: shared-logs
      - hostPath:
          path: /mnt/NAS/ix-applications/releases/plex/volumes/ix_volumes/ix-plex_transcode
          type: ""
        name: transcode
      - hostPath:
          path: /mnt/NAS/Media/Plex/TV_Shows
          type: ""
        name: extrappvolume-0
      - hostPath:
          path: /mnt/NAS/Media/Plex/Movies
          type: ""
        name: extrappvolume-1
      - hostPath:
          path: /mnt/NAS/Media/Plex
          type: ""
        name: extrappvolume-2
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2023-04-21T14:18:33Z"
    lastUpdateTime: "2023-04-21T14:24:33Z"
    message: ReplicaSet "plex-6f665bfbf7" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  - lastTransitionTime: "2023-04-21T20:20:48Z"
    lastUpdateTime: "2023-04-21T20:20:48Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  observedGeneration: 4
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1
root@truenas[/home/admin]# 


Seems line 106 may be at fault. However,
I even went so far as running `k3s kubectl edit deployment plex --namespace=ix-plex` and manually added in

```yaml
resources:
limits:
cpu: "4"
memory: 8Gi
```
and reattempted to deploy, but even that didn't do anything...
 

ShaggyKris

Dabbler
Joined
Apr 21, 2023
Messages
12
I also just deleted both the app and the docker image and attempted to redeploy with no GPU resources allocated, and still got the error. Seems there's some issue with GPU allocation with this release of the chart, as disabling it for all apps in advanced settings clears up the issue.
 

lupinlicious

Dabbler
Joined
Jan 13, 2020
Messages
25
I also have the same issue with TrueNAS-SCALE-22.12.2. Cannot install Plex, same errors as above.
Tried to install another application which was successful but cannot start it.
 

Zain

Contributor
Joined
Mar 18, 2021
Messages
124
Same issue here.

[EFAULT] Failed to upgrade chart release: Error: UPGRADE FAILED: cannot patch "plex" with kind Deployment: Deployment.apps "plex" is invalid: spec.template.spec.containers[0].resources.limits: Required value: Limit must be set for non overcommitable resources

Is there legit fix for this?

TIA
 

fayelund

Dabbler
Joined
Aug 27, 2021
Messages
31
I just rolled back to plex app version 1.7.38, that went well without any errors
 
Joined
Apr 22, 2023
Messages
4
I am having the same issue after the upgrade and I would also like to know where to get the 1.7.38. The app store only allows the 1.32.0.6973_1.7.40. I uninstalled everything thinking it was some other issue before realizing it was a version bug.
 

ShaggyKris

Dabbler
Joined
Apr 21, 2023
Messages
12
Update: Yes I also got mine working by going to advanced settings and disabling the GPU support. Thanks guys!
Just know that by doing that you'll be using your CPU for transcoding rather than the integrated graphics, which could shoot up your CPU usage and likely lead to buffering issues. This is especially true in transcoding 4K content and remote access. This is why in the interim I moved to TrueCharts until using the official image can be fixed.
 

fayelund

Dabbler
Joined
Aug 27, 2021
Messages
31
I had the option to roll back to earlier version of plex, through the menu on the app(same place as you perform the upgrade). It also seems like on new installs I can choose the version to install, so taht should make installing 1.7.38 possible.
This might not work for others, but it did for me.
 
Joined
Apr 22, 2023
Messages
4
Just know that by doing that you'll be using your CPU for transcoding rather than the integrated graphics, which could shoot up your CPU usage and likely lead to buffering issues. This is especially true in transcoding 4K content and remote access. This is why in the interim I moved to TrueCharts until using the official image can be fixed.
I am running an AMD Ryzen 5600G right now, I don't know how good the CPU transcoding is on that CPU but it should be pretty decent—got any links for installing TrueCharts?
 

ShaggyKris

Dabbler
Joined
Apr 21, 2023
Messages
12
I am running an AMD Ryzen 5600G right now, I don't know how good the CPU transcoding is on that CPU but it should be pretty decent—got any links for installing TrueCharts?
Here's the docs for getting started with TrueCharts

That being said, for actually getting it up and running on your system it was more laborious than setting it up with the official app. You'll need to set up port forwarding on your router, and ensure that you add your Host NAS IP and router IP into the list of accepted IPs in the config.

Just make sure that you set it up to use the same user you made for Plex datasets as you did with the official app, else you'll have to deal with permissions hell.
 

ShaggyKris

Dabbler
Joined
Apr 21, 2023
Messages
12
Disable GPU support in Applications, Advanced Settings. Install Plex. Re enable GPU support.

This worked for me
You can do that, but it won't use your GPU as a result. Can confirm via transcode testing using my phone. This was one of the first things I tried.
 
Top