Code Monkey home page Code Monkey logo

Comments (6)

Thom-x avatar Thom-x commented on June 27, 2024

Hello you can disable http and exec httpd manually to see the error and debug. Don't hesitate to see closed issues, it sounds familiar to me.

from docker-fr24feed-piaware-dump1090.

simonmysun avatar simonmysun commented on June 27, 2024

Hi, thank you for your hints.

the thttpd is killed by OOM killer:

[Fr Mai  3 09:51:25 2024] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/system.slice/docker-8bd35660a3190bbe7f501e1a3a8fc0226f392271f22e2fd86eefab8567427932.scope,task=thttpd,pid=2701529,uid=65534
[Fr Mai  3 09:51:25 2024] Out of memory: Killed process 2701529 (thttpd) total-vm:180355452kB, anon-rss:51083712kB, file-rss:320kB, shmem-rss:0kB, UID:65534 pgtables:100020kB oom_score_adj:0

It works by specifying ulimit according to #107 (comment)

In my case, it's adding

services:
  fr24feed-piaware:
    ...
    ulimits:
      nproc: 65535
      nofile:
        soft: 20000
        hard: 40000

to the docker compose file.

Interestingly, the adding this actually lower the limit, before:

root@111c7e4eb5c0:/# ulimit -a
real-time non-blocking time  (microseconds, -R) unlimited
core file size              (blocks, -c) unlimited
data seg size               (kbytes, -d) unlimited
scheduling priority                 (-e) 0
file size                   (blocks, -f) unlimited
pending signals                     (-i) 256081
max locked memory           (kbytes, -l) 8192
max memory size             (kbytes, -m) unlimited
open files                          (-n) 1073741816
pipe size                (512 bytes, -p) 8
POSIX message queues         (bytes, -q) 819200
real-time priority                  (-r) 0
stack size                  (kbytes, -s) 8192
cpu time                   (seconds, -t) unlimited
max user processes                  (-u) unlimited
virtual memory              (kbytes, -v) unlimited
file locks                          (-x) unlimited
root@51e95bc16fed:/# nproc 
20

after:

root@51e95bc16fed:/# ulimit -a
real-time non-blocking time  (microseconds, -R) unlimited
core file size              (blocks, -c) unlimited
data seg size               (kbytes, -d) unlimited
scheduling priority                 (-e) 0
file size                   (blocks, -f) unlimited
pending signals                     (-i) 256081
max locked memory           (kbytes, -l) 8192
max memory size             (kbytes, -m) unlimited
open files                          (-n) 20000
pipe size                (512 bytes, -p) 8
POSIX message queues         (bytes, -q) 819200
real-time priority                  (-r) 0
stack size                  (kbytes, -s) 8192
cpu time                   (seconds, -t) unlimited
max user processes                  (-u) 65535
virtual memory              (kbytes, -v) unlimited
file locks                          (-x) unlimited
root@111c7e4eb5c0:/# nproc 
20

The difference in on "open files" and "max user processes".

and thttpd actually engages far less memory while running:

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                                      
    226 nobody    20   0    8936   7028    800 S   0.0   0.0   0:00.13 thttpd  

I'm quite confused why this works... and also why thttpd allocates so much memory in that condition.

from docker-fr24feed-piaware-dump1090.

simonmysun avatar simonmysun commented on June 27, 2024

I would suggest mentioning it in your README. You may close the issue if you find it unnecessary.

from docker-fr24feed-piaware-dump1090.

simonmysun avatar simonmysun commented on June 27, 2024

Ahh I see the SYSTEM_HTTP_ULIMIT_N option when going through your source code. Sorry for missing it while reading README.

Could you please explain why the number 1048576 is chosen?

from docker-fr24feed-piaware-dump1090.

Thom-x avatar Thom-x commented on June 27, 2024

Yes, it was for fr24, if I remember it was the max value ?

from docker-fr24feed-piaware-dump1090.

simonmysun avatar simonmysun commented on June 27, 2024

I see.

What I figured out:

I think the proper solution here is to set a lower limit. In this case I believe 1024 is far beyond enough.

from docker-fr24feed-piaware-dump1090.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.