Comments (6)
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.
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.
I would suggest mentioning it in your README. You may close the issue if you find it unnecessary.
from docker-fr24feed-piaware-dump1090.
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.
Yes, it was for fr24, if I remember it was the max value ?
from docker-fr24feed-piaware-dump1090.
I see.
What I figured out:
- thttpd allocates its connection table with the number from getrlimit (ref: https://github.com/jpouellet/thttpd/blob/0066035fc65d190186486a478c61f0b592e7224c/fdwatch.c#L718 ). If the result is -1, use 8192 (ref: https://github.com/jpouellet/thttpd/blob/0066035fc65d190186486a478c61f0b592e7224c/fdwatch.c#L162 ).
- However from some version of docker the nofile limit insides containers becomes 1073741816 and some other software users encountered similar problems (ref: https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2020q1/013821.html , haproxy/haproxy#2043 )
- thttpd tries to initiallize its connection table with size of 1073741816 and triggers OOM killer
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)
- multi feeder HOT 2
- Request for dashboard link for each service
- Radarbox - 'already claimed' error on supplied sharing key HOT 1
- ADSBHub feeding
- Connection refused at web interface (8080) on 1.29.0 HOT 2
- ADSBHub sometimes key could not work HOT 4
- piaware MLAT Client with wrong configuration for Beast-format results connection and http feed tracker dosn´t show any airplanes HOT 7
- ADSB exchange uuid generation. HOT 3
- Please advice. HOT 1
- How to Access rtlsdr-gain Parameter? HOT 1
- MLAT inactive - A new upgrade is available for your Raspberry Pi RadarBox software!
- Services in container keeps stopping HOT 4
- Address already in use, container stops
- dump978
- FR24 feeder reported as online, no data uploaded HOT 1
- Feature Request: Feed in to 360Radar
- Not able to pull my Dump1090 feed from my external system anymore HOT 2
- Container keep crashing HOT 1
- Support of RTL-SDR v4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-fr24feed-piaware-dump1090.