Persistent Libvirt Connections#388
Merged
retspen merged 4 commits intoretspen:masterfrom Aug 27, 2014
Merged
Conversation
* connections are shared among threads (not processes) * settings LIBVIRT_KEEPALIVE_INTERVAL and LIBVIRT_KEEPALIVE_COUNT added to control the clientside keepalive protocol * one connection per host will be created and used as long as it is alive
….log (at least for ssh connections). Connection error messages should be enough to determine what went wrong. In the future it may also be possible to set "connection failed" based on the last error code returned by libvirt.
02fd284 to
9aaca9e
Compare
Owner
|
Great job. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements connection pooling. Only one connection per vm-host per webserver-process is created and managed by a new class "wvmConnectionManager".
Outside of the vrtManager.connection module the old behaviour is preserved.
This is tested with apache2 using mod_wsgi and the Django development server. Nginx was not tested.
The branch https://github.com/myvision-de/webvirtmgr/tree/connection-pooling-debug may be useful when testing this PR with another server.
Commit c8f0293 is optional. It prohibits some further log spamming in auth.log. It may be more practical to evaluate the error code from libvirt to determine if authentication fails or the server is just down.