Nginx Pod keeps restarting with Exit Code 137 in official Nextcloud Helm deployment

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best-effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.8-fpm (official image)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Container image based on Debian/bookworm (Nextcloud 30.0.8-fpm) running in Kubernetes v<replace me> on nodes with "<replace OS of nodes>"
  • Web server and version (e.g, Apache 2.4.25):
    • nginx (side-car container from the Helm chart)
  • Reverse proxy and version (e.g. nginx 1.27.2):
    • nginx 1.27.x (same side-car)
  • PHP version (e.g, 8.3):
    • 8.2.28 (with Zend OPcache v8.2.28)
  • Is this the first time you’ve seen this error? (Yes / No):
    • No – nginx restarts repeatedly
  • When did this problem seem to first start?
    • Since initial deployment on <replace date>
  • Installation method (e.g. AIO, NCP, Bare Metal/Archive, etc.)
    • Official Nextcloud Helm chart
  • Are you using Cloudflare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

The nginx side-car container restarts several times a day with Exit Code 137.
Exit 137 usually indicates the kernel sent SIGKILL (commonly OOM), but node-level and container-level metrics show plenty of free memory and no spikes. The nextcloud-fpm and cron containers stay healthy.

Nextcloud

(Provide any relevant lines from nextcloud.log that correspond to the restart events)

Web Browser

(Only if you see issues in the web UI – probably not relevant for an nginx crash, but include if you notice errors)

Helm values excerpt (resource requests/limits)

nextcloud:
  resources:
    limits:
      cpu: "10"
      memory: 22Gi
    requests:
      cpu: "8"
      memory: 20Gi

nginx:
  resources:
    limits:
      cpu: "8"
      memory: 12Gi
    requests:
      cpu: "6"
      memory: 10Gi





max_execution_time = 3600
max_input_time     = 3600
memory_limit       = 256M

[www]
pm = dynamic
pm.max_children      = 160
pm.start_servers     = 32
pm.min_spare_servers = 16
pm.max_spare_servers = 48
pm.max_requests      = 500
php_admin_value[memory_limit] = 512M
upload_max_filesize           = 100G
post_max_size                 = 100G