"client_max_body_size" Direktive ungültiger Wert

Ich bin auch auf dieses Problem gestoßen. In meinem Fall war es:

params:
  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  db_shared_buffers: "2048MB"

  ## can improve sorting performance, but adds memory usage per-connection
  db_work_mem: "40MB"

  ## Reduce max upload size
  upload_size: 1024kb
[Sun 19 Mar 2023 04:42:50 PM UTC] Run reload cmd: sv reload nginx
warning: nginx: unable to open supervise/ok: file does not exist
[Sun 19 Mar 2023 04:42:50 PM UTC] Reload error for :
Started runsvdir, PID is 551
nginx: [emerg] "client_max_body_size" directive invalid value in /etc/nginx/conf.d/discourse.conf:112
ok: run: redis: (pid 564) 0s
ok: run: postgres: (pid 563) 0s
supervisor pid: 565 unicorn pid: 587
nginx: [emerg] "client_max_body_size" directive invalid value in /etc/nginx/conf.d/discourse.conf:112
nginx: [emerg] "client_max_body_size" directive invalid value in /etc/nginx/conf.d/discourse.conf:112

Aber aus irgendeinem Grund funktioniert es mit: upload_size: 1m.

Das ist in der Tat ungültig, das Korrekte wäre 1024k gemäß den Nginx-Dokumenten. Ich sehe nur, dass es Zahlen und SI-Multiplikatoren akzeptiert.

3 „Gefällt mir“

Ahh, danke @Falco, das war also das Problem.

1 „Gefällt mir“

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.