Comment 0 for bug 1942179

Revision history for this message
Slawek Kaplonski (slaweq) wrote : neutron api worker leaks memory when processing requests to not existing controllers

Authorized cloud user may do API requests to neutron to not existing endpoints, like e.g.:

curl -g -i -X GET http://10.120.0.30:9696/v2.0/blabla -H "Accept: application/json" -H "User-Agent: openstacksdk/0.59.0 keystoneauth1/4.3.1 python-requests/2.26.0 CPython/3.6.8" -H "X-Auth-Token: $token"

and each such request will increase memory consumption of the neutron-api worker process.

What I did was:

* start neutron server with just one api worker (easier to calculate memory consumption but it would be the same leak in case of more workers too). Memory consumption was:

sudo pmap 212436 | tail -n 1
 total 183736K

* now run command like:

$ i=1; while [ $i -lt 2000 ]; do echo "Request $i"; curl -g -i -X GET http://10.120.0.30:9696/v2.0/blabla -H "Accept: application/json" -H "User-Agent: openstacksdk/0.59.0 keystoneauth1/4.3.1 python-requests/2.26.0 CPython/3.6.8" -H "X-Auth-Token: $token" 2>1 >/dev/null; i=$(( i+1 )); sleep 0.01; done

* check memory consumption of the same api worker now:

sudo pmap 212436 | tail -n 1
 total 457896K