Comments (22)
@jpillora I need help, thanks :)
from webproc.
from webproc.
No, the log frequency is about 1 line/s.
And this phenomenon is only recently. Before, I used v0.3.0
version to run stably for nearly a year, and did not find this problem. I upgraded to version v0.4.0
the day before yesterday, and this problem occurred two days after running.
from webproc.
In order to eliminate the problem of dnsmasq
, I rerun the program. I used mpstat 1
to print out the CPU utilization per second, and found a very interesting phenomenon.
# webproc -c /etc/dnsmasq.conf -p 80 --user test --pass 123456 -- mpstat 1
After the program runs for 2 minutes, the CPU utilization rate is still as high as 100%.
These are mpstat
output:
09:22:39 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:22:40 all 0.00 0.00 0.00 0.00 0.25 0.25 0.00 0.00 99.50
09:22:40 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:22:41 all 0.00 0.00 0.25 0.00 0.00 0.00 0.00 0.00 99.75
09:22:41 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:22:42 all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
......
09:24:24 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:25 all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
09:24:25 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:26 all 0.00 0.00 0.00 0.00 0.00 0.25 0.00 0.00 99.75
09:24:26 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:27 all 0.00 0.00 0.25 0.00 0.00 0.00 0.00 0.00 99.75
09:24:27 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:28 all 4.52 0.00 0.50 0.00 0.25 0.00 0.00 0.00 94.72
09:24:28 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:29 all 16.08 0.00 1.51 0.00 0.50 0.50 0.00 0.00 81.41
09:24:29 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:30 all 0.25 0.00 0.00 0.00 0.25 0.00 0.00 0.00 99.50
09:24:30 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:31 all 18.30 0.00 3.51 0.00 0.50 0.00 0.00 0.00 77.69
09:24:31 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:32 all 17.97 0.00 0.51 0.00 0.51 0.00 0.00 0.00 81.01
09:24:32 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:33 all 17.88 0.00 0.76 0.00 0.76 0.25 0.00 0.00 80.35
09:24:33 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:34 all 18.18 0.00 0.76 0.00 0.51 0.00 0.00 0.00 80.56
09:24:34 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:35 all 19.10 0.00 0.50 0.00 0.75 0.00 0.00 0.00 79.65
09:24:35 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:36 all 19.24 0.00 0.76 0.00 0.51 0.00 0.00 0.00 79.49
09:24:36 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
09:24:37 all 18.94 0.00 0.76 0.00 0.76 0.00 0.00 0.00 79.55
Since then, CPU usage has remained at this level.
from webproc.
from webproc.
I just executed this command:
webproc -c /etc/dnsmasq.conf -p 80 --user test --pass 123456 -- mpstat 1
and then open the browser to access: http://localhost
.
mpstat 1
prints CPU usage every second.
from webproc.
from webproc.
Exactly. I find that if I don't open the browser, the CPU usage is always less than 0.5%. Once you open your browser, it's 100% in a flash. But why is that?
Will JavaScript scripts affect the CPU utilization of the server?
from webproc.
from webproc.
Fedora 33, amd64
from webproc.
from webproc.
In addition, I suggest adding the net/http/pprof
HTTP endpoint to facilitate troubleshooting.
from webproc.
It seems that this problem does not exist in v0.3.0
. Can I switch back to the old version? What are the disadvantages?
from webproc.
from webproc.
I was wrong. Just now, I spent more than an hour retesting the v0.3.0
version and found that the leak still exists. CPU usage is increasing at a very slow rate, but it does continue to increase. This can lead to problems that are hard to detect and I've ignored in the past year.
In the version of v0.4.0
, the CPU consumption increases rapidly when using the browser to access the page, which leads to the problem being found quickly.
This problem looks SERIOUS and needs to be fixed. Before the problem is solved, I think I can only disable webproc
.
Or are there any effective measures?
from webproc.
from webproc.
I have the same problem. Setting the max-lines to 100 didn't help...
from webproc.
from webproc.
Arm64. What helped, was disabling the logs for the webui - with the downside of missing logs in the webui.
-l proxy
By the way - thanks for creating webproc!!
from webproc.
I had the same issue like above. @jpillora
ubuntu x86_64.
from webproc.
I had the same issue like above. @jpillora ubuntu x86_64.
finally,
downgrade to 0.3.3 to fix this high cpu usage.
from webproc.
Same issue with 0.4.0. I added "-l proxy" and that solved it. Running on
Linux raspberrypi 5.4.0-1066-raspi #76-Ubuntu SMP PREEMPT Mon Jun 27 11:02:52 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
from webproc.
Related Issues (20)
- "no change" error with multiple files HOT 1
- FR: Manage files, but not run daemons.
- I can not build it successfully HOT 6
- Add option to avoid restart on file save HOT 2
- Is there any way to send sighup?
- Can not find package jsonpatch HOT 5
- Your complete example of program.toml doesn't work
- Second config file HOT 1
- Ctrl+S hotkey to save. HOT 2
- Feature request to add filter logs
- Can webproc be registered as a service HOT 1
- recommend a warehouse [推荐一个仓库]
- A way to "raw" GET/PUT the config files would be helpful in automated infrastructure HOT 1
- Multiple ProgramArgs
- special-case modes for certain files
- how is webproc used for nginx in docker container HOT 6
- Memory leak with lots of on screen log updates HOT 1
- Handle or strip ANSI color HOT 1
- Why can't my compiled webproc binary be used?
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 webproc.