You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "zzzzl13 (via GitHub)" <gi...@apache.org> on 2023/04/04 08:57:44 UTC
[GitHub] [skywalking] zzzzl13 opened a new issue, #10641: [Bug] python agent causes high cpu
zzzzl13 opened a new issue, #10641:
URL: https://github.com/apache/skywalking/issues/10641
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
### Apache SkyWalking Component
Python Agent (apache/skywalking-python)
### What happened
I have a python project with flask and use skywalking python agent. However when I enable the agent, the cpu will go high, even try disable the profile and log reporter, and even create a hello world flask, it still high cpu.
```
from flask import Flask
from skywalking import config, agent
import socket
app=Flask(__name__)
@app.route("/")
def index():
return "<h1>Hello World!</h1>"
@app.route("/user/<name>")
def user(name):
return "<h1>Hello,%s</h1>"%name
if __name__=="__main__":
skw_host="skywalking_oap_host"
skw_agent="local_test"
config.init(agent_collector_backend_services="%s:11800"%skw_host, agent_name=skw_agent, agent_instance_name=socket.gethostname(), agent_protocol="grpc", agent_meter_reporter_period=60, agent_collector_heartbeat_period=60, agent_logging_level="ERROR",agent_profile_active=False, agent_log_reporter_active=False)
agent.start()
app.run(host="0.0.0.0",port=8000)
```
and use "python3.7 flask_test.py" to run this code
after "top -H", the cpu goes to 99.7%
26 node 20 0 823184 62048 19744 R 99.7 1.5 8:41.35 python3.7
### What you expected to happen
I think it should not use that much cpu
### How to reproduce
rerun the code above
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng closed issue #10641: [Bug] python agent causes high cpu
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng closed issue #10641: [Bug] python agent causes high cpu
URL: https://github.com/apache/skywalking/issues/10641
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org