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

Disallow web server to use 100% cpu #155

Closed
1 of 2 tasks
caseydiers opened this issue Oct 31, 2021 · 2 comments
Closed
1 of 2 tasks

Disallow web server to use 100% cpu #155

caseydiers opened this issue Oct 31, 2021 · 2 comments

Comments

@caseydiers
Copy link

caseydiers commented Oct 31, 2021

During todays mesh-oween, I discovered an issue on my lower memory (32MB) devices. When there where 1000 nodes all connected, and the device was taxed heavily, they could cope just fine passing traffic at idle. However, when the webpage was in use it was just too much. Loading the main page spiked CPU to 100% and loading the mesh status page would timeout several minutes into trying. It would occasionally drop its connection to the network altogether.

I wonder if the web server software could be limited in the percentage of system resources it can use so that when the device is heavily taxed (as it would be in an emergency) simply loading a webpage doesn't cause the rf link to fail due to the node becoming non-responsive. Or alternately have the web server system process priority set considerably lower than the other more critical priorities. I would prefer to have it pass traffic more reliably than load the webpage. Obviously the solution to all of this is to get a more powerful device, however in this (probably common in these tests) edge case, I believe the software could fail more gracefully. Especially given that when the connection is dropped, the webpage doesn't load either, so there is no benefit to prioritizing the page load.

Or even a radio box (I don't know how to do a radio box in markdown...:)

  • Prioritize Mesh Traffic
  • Prioritize Web Server
@dman776
Copy link
Contributor

dman776 commented Oct 31, 2021 via email

@caseydiers
Copy link
Author

The issue where the webserver uses a lot of cpu is observed in these conditions when loading any of the pages, however most pages load relatively quickly still so it isn't a problem. However, the mesh status page can take upwards of a minute, so it by far is the largest issue.

What I'm proposing is the 'big hammer' approach of just globally reducing the priority of the web server. However, I suppose it would also be possible to alleviate the stress by providing an option to not fully load the mesh status page, or somehow reduce the amount of detail, or something, when the memory on the device is full.

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

2 participants