mriedmann / humhub-docker

Alpine-based PHP-FPM and NGINX HumHub docker-container
MIT License
95 stars 79 forks source link

unable to post a content with a picture #282

Closed jvies closed 2 years ago

jvies commented 2 years ago

hi all,

I've a new issue on my humhub deployment. The users can't post a message in any space with some joint file. Adding pictures to any gallery or file sharing on the same humhub works fine.

The error visible from firefox is:

{
    "readyState": 4,
    "responseText": "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.20.2</center>\r\n</body>\r\n</html>\r\n",
    "status": 502,
    "statusText": "Bad Gateway"
}

and from the docker image:

humhub_1  | 2022/09/04 07:18:30 [warn] 47#47: *7 a client request body is buffered to a temporary file /var/lib/nginx/tmp/client_body/0000000001, client: 172.18.0.3, server: _, request: "POST /file/file/upload HTTP/1.1", host: "intranet.foo.bar"
humhub_1  | 2022/09/04 07:18:34 [error] 47#47: *7 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.18.0.3, server: _, request: "POST /file/file/upload HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "intranet.foo.bar"
humhub_1  | [04-Sep-2022 07:18:34] WARNING: [pool www] child 57 exited on signal 9 (SIGKILL) after 12.663394 seconds from start

any idea with what's wrong with my deployment ?

Thx a lot.

mriedmann commented 2 years ago

Hi!

As far as I see it, it should not be a timing or size issue. That should generate different messages. A blind guess would be Memory Shortage or something going on with your File handlers or Storage in general. Can you also have a look at the Kernel and general system logs? Can you give us a bit more info about your setup? (OS, Memory, Shared Host vs. Dedicated, ...)

jvies commented 2 years ago

Thank you ! I just not checked my host logs... It's an oom issue. I'll see how to increase the host RAM (it's a vhost at OVH).

[32959312.380836] oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=docker-36cc120b0801478bf85b06ea8175a3e3e0e2afd96c365992905d5cfa1bd3d508.scope,mems_allowed=0,oom_memcg=/system.slice/docker-36cc120b0801478bf85b06ea8175a3e3e0e2afd96c365992905d5cfa1bd3d508.scope,task_memcg=/system.slice/docker-36cc120b0801478bf85b06ea8175a3e3e0e2afd96c365992905d5cfa1bd3d508.scope,task=php-fpm7,pid=3022262,uid=100
[32959312.388198] Memory cgroup out of memory: Killed process 3022262 (php-fpm7) total-vm:657500kB, anon-rss:486876kB, file-rss:4696kB, shmem-rss:4kB, UID:100 pgtables:1224kB oom_score_adj:0
[32959312.415058] oom_reaper: reaped process 3022262 (php-fpm7), now anon-rss:0kB, file-rss:0kB, shmem-rss:4kB