Comment 3 for bug 1625774

Revision history for this message
Christian Muirhead (2-xtian) wrote :

Dumping the goroutines shows that it's leaking State instances, with the attendant watchers and mongo connections. That makes sense because the mongo memory also goes up as we create and destroy models.

Tracking down state open/close pairs shows that the "leaked" States are stored in the API server's StatePool. There's nothing that will close and remove States from the pool when the model is destroyed. At the moment the pool doesn't keep track of which States are in use - there's no call made by the server to release them back to the pool. I'll need to add something like that so that we don't try to close it in destroy-model while a different request is trying to use it.