Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uWSGI: limit memory usage - set max-fd #946

Open
thorkill opened this issue Jan 14, 2025 · 1 comment
Open

uWSGI: limit memory usage - set max-fd #946

thorkill opened this issue Jan 14, 2025 · 1 comment

Comments

@thorkill
Copy link

thorkill commented Jan 14, 2025

In some circumstances uWSGI allocates over 8GB of RAM while using docker (latest).

detected max file descriptor number: 1073741816

Check your memory consumption:

$> docker top linkding -eo pid,cmd,size
PID                 CMD                 SIZE
1559667             uwsgi               --http [::]:9090 uwsg 41212
1559729             uwsgi               --http [::]:9090 uwsg 49552
1559731             uwsgi               --http [::]:9090 uwsg 49552
1559733             uwsgi               --http [::]:9090 uwsg 8429820

While investigating the issue I have came across:

unbit/uwsgi#2299

Following the lead I have limited max-df = 4096 in uwsgi.ini. The value is probably to low for larger instances however 1073741816 is too large.

The memory consumption is now "normal" without any issues (I am not using archive/snaptshot/chromium).

$> docker top linkding -eo pid,cmd,size
PID                 CMD                 SIZE
1582194             uWSGI               master 41276
1582294             uWSGI               worker 1 58788
1582296             uWSGI               worker 2 54956
1582298             uWSGI               http 1 41276
@thorkill
Copy link
Author

Relates to #453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant