All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ require("globals.inc"); require("guiconfig.inc"); require_once("haproxy.inc"); if (!is_array($config['installedpackages']['haproxy'])) { $config['installedpackages']['haproxy'] = array(); } $pconfig['enable'] = isset($config['installedpackages']['haproxy']['enable']); $pconfig['maxconn'] = $config['installedpackages']['haproxy']['maxconn']; if ($_POST) { unset($input_errors); $pconfig = $_POST; if ($_POST['apply']) { $retval = 0; config_lock(); $retval = haproxy_configure(); config_unlock(); $savemsg = get_std_save_message($retval); unlink_if_exists($d_haproxyconfdirty_path); } else { if ($_POST['enable']) { $reqdfields = explode(" ", "maxconn"); $reqdfieldsn = explode(",", "Maximum connections"); } else { } do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if ($_POST['maxconn'] && (!is_numeric($_POST['maxconn']))) { $input_errors[] = "The maximum number of connections should be numeric."; } if (!$input_errors) { $config['installedpackages']['haproxy']['enable'] = $_POST['enable'] ? true : false; $config['installedpackages']['haproxy']['maxconn'] = $_POST['maxconn'] ? $_POST['maxconn'] : false; touch($d_haproxyconfdirty_path); write_config(); } } } $pgtitle = "Services: HAProxy: Settings"; include("head.inc"); ?>

You must apply the changes in order for them to take effect.");?>
  onClick="enable_change(false)"> Enable HAProxy
Maximum connections
value=""> per Backend.
Sets the maximum per-process number of concurrent connections to X.
NOTE: setting this value too high will result in haproxy not being able to allocate enough memory.
Connections Memory usage

999 3276 Kilobytes
99999 4448 Kilobytes
999999 32540 Kilobytes
9999999 143 Megabytes