[vbox-dev] vboxweb.cpp patch for HTTP keep-alive

Ian Moore imooreyahoo at gmail.com
Fri Jul 23 13:38:54 PDT 2010


The attached patch adds HTTP keep-alive support to vboxwebsrv.

When working on a web interface for VirtualBox, I found a lot of sockets on
the vboxwebsrv end are left in TIME_WAIT for quite a while. This takes up
system resources and can cause vboxwebsrv to use all of its allotted open
files on *nix systems. This is not "wrong," but can be somewhat alleviated.
With this patch I went from hundreds of connections left in TIME_WAIT to 0.

By default, each object property accessed by a web service is a separate TCP
connection to vboxwebsrv. When obtaining.. say .. a list of VMs and their
properties, this is a lot of connections. With HTTP keep-alive enabled in
gSOAP, all SOAP requests go through the same, existing HTTP connection. This
keeps the amount of socket connections to a minimum.

In accordance with VirtualBox's contributor information: The attached patch
is submitted under the MIT license.

Thank you for your time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100723/0a3fdabd/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vboxweb.cpp-keepalives.patch
Type: application/octet-stream
Size: 846 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100723/0a3fdabd/attachment-0001.obj 

More information about the vbox-dev mailing list