Smallweb Chatter Post
Jan. 5th, 2025 01:04 amHappy New Year,
smallweb! Let's chat!
Chatter posts are irregularly-occurring posts to... chat in. Show off what you're working on, what cool stuff you've found lately, what's going well or not so well or anything else. Stop in to say Hi if you want.
Do you have any plans for the year/month/week?
Chatter posts are irregularly-occurring posts to... chat in. Show off what you're working on, what cool stuff you've found lately, what's going well or not so well or anything else. Stop in to say Hi if you want.
Do you have any plans for the year/month/week?
no subject
Date: 2025-01-06 01:29 am (UTC)However, I continue to struggle with my cpu constantly being near 100%, I think from bot traffic, and so far I haven't been successful at dealing with it. added a robots.txt file, and confirmed I have fail2ban installed, but no luck. the processes involved in using up the cpu are both uwsgi but looking for solutions hasn't been productive yet. would be VERY open to suggestions if any of you have any!
so, you know, some good news and some bad, and the learning curve continues!
no subject
Date: 2025-02-03 07:53 am (UTC)Could it be this stuff? (I think these are all the same issue under the hood, just providing several links because they have different context and one might be more useful than the others to you.)
As far as I can tell, uwsgi tries to do an allocation that scales linearly with the number of file descriptors it thinks might ever possibly exist on the system, and then high CPU usage occurs when other parts of the code iterate over those gigantic arrays. So putting a cap on what uwsgi thinks is the maximum number of fds, by setting the environment variable
UWSGI_MAX_FDor by setting the nofile ulimit in the Docker container, might fix it. I have Linkding running on PikaPods and the max number of fds is set to 524288 as far as uwsgi is concerned, and the CPU usage is very reasonable; I've seen people in the comments of those issues report setting it as low as 1024 with no problems.