when client disconnected, garbage collecting is too heavy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Critical
|
Samuel Merritt | ||
OpenStack Security Advisory |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When a client disconnect their GET object request, proxy server knows it and after 60sec(client_
Before proxy server close object-servers connection, it get garbagging collection from object-server for preventing memory leak in object-server.
(IMHO) One disconnected connection don't make problem, but if many disconnected connections in short time make heavy load in object-server.
In swift/proxy/
def close_swift_
try:
except Exception:
pass
try:
while src.read(
except Exception:
pass
try:
except Exception:
pass
You can test this like below
reproduce: (for heavy load in object server)
1) make large object(500MB) and upload it in swift
2) download this file with many concurrent connections (100~1000 connections)
3) after start downloading, wait for object-servers open their files.
4) then disconnect all connections.
5) you can see object server`s load are increased. (see it like loadavg)
And I tested without garbage collecting object-servers leak 4k in each connection. But it is not uncleared yet. I need more test.
description: | updated |
Changed in swift: | |
status: | Fix Committed → Fix Released |
Changed in swift: | |
milestone: | 1.10.0-rc1 → 1.10.0 |
no longer affects: | swift/havana |
I think this is the problem we're experiencing in production with swift 1.7.5.
We use the following shell line to check object-server connections vs proxy client connections:
# echo "object-server: `netstat -alnt | grep :6010 | wc -l`" ; echo "clients: `netstat -alnt | grep :443 | wc -l`";
object-server: 135
clients: 3
(in this output seems to be OK, not a problem yet)
When the object-server load gets too high, the number of connections in object-server is over 1200 and the clients is under 200.
It gets corrected by restarting the proxies.