Thank you for reporting this issue! The error appears to be generated from a
cpython call made by
uwsgi. We’re currently working towards finding the root cause and we will post back when we have more information.
In the meantime, there’s a couple of workarounds that you can employ.
We’ve discovered that we no longer see the issue when installing the Python agent without c-extensions. The following command will allow you to install the Python agent without the c-extensions:
NEW_RELIC_EXTENSIONS=false pip install newrelic
Please keep in mind, if you choose to do this, you need to be aware of the following caveats:
- Although the Python agent will run, it will do so without some non-core features (i.e. The Capacity Analysis Report).
- Part of the Python agent is written in C. Some of the agent’s code that is written in C is meant to optimize the agent. It’s possible that installing the Python agent without the C extensions may lead to a performance impact.
The other option is to change a
uwsgi configuration option. This involes adding the following lines in
wsgi-env-behavior = holy
This workaround may result in a slow-growing memory leak with a large number of requests so it’s recommended that you restart your
uwsgi workers periodically. In testing, we found 10,000 requests to be an appropriate limit, but feel free to increase this value if you deem it necessary. Here is one option to restart your workers (
max-requests = 10000
If you decide to move forward with running the agent with either of these workarounds, we highly recommend that you do some performance testing to get a better idea about the performance impact.