<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Captive portal "maximum concurrent connections" setting ignored]]></title><description><![CDATA[<p dir="auto">The "maximum concurrent connections" setting on the [Service -&gt; Captive Portal] page appears to be ignored.</p>
<p dir="auto">The problem appears to be in /etc/inc/captiveportal.inc.  The following functions are called from captiveportal_init_webgui():</p>
<p dir="auto">system_generate_lighty_config("{$g['varetc_path']}/lighty-CaptivePortal-SSL.conf",<br />
$cert, $key, $cacert, "lighty-CaptivePortal-ssl.pid", "8001", "/usr/local/captiveportal/",<br />
"cert-portal.pem", "ca-portal.pem", "1", $maxproc, $use_fastcgi, true);</p>
<p dir="auto">system_generate_lighty_config("{$g['varetc_path']}/lighty-CaptivePortal.conf",<br />
"", "", "", "lighty-CaptivePortal.pid", "8000", "/usr/local/captiveportal/",<br />
"cert-portal.pem", "ca-portal.pem", "1", $maxproc, $use_fastcgi, true);</p>
<p dir="auto">Note the order of the 10th and 11th parameters, "1" and $maxproc.  The function is defined in /etc/inc/system.inc:</p>
<p dir="auto">function system_generate_lighty_config($filename,<br />
$cert,<br />
$key,<br />
$ca,<br />
$pid_file,<br />
$port = 80,<br />
$document_root = "/usr/local/www/",<br />
$cert_location = "cert.pem",<br />
$ca_location = "ca.pem",<br />
$max_procs = 2,<br />
$max_requests = "2",<br />
$fast_cgi_enable = true,<br />
$captive_portal = false) {</p>
<p dir="auto">Note that the 10th parameter, $max_procs will always be set to "1" when called from captiveportal_init_webgui().  And the 11th parameter, $max_requests doesn't appear to even be used; this is how the lighty config file is written later in the function:</p>
<p dir="auto">"PHP_FCGI_CHILDREN" =&gt; "$max_procs",<br />
"PHP_FCGI_MAX_REQUESTS" =&gt; "500"</p>
<p dir="auto">and again here:</p>
<p dir="auto">fastcgi.server = ( ".php" =&gt;<br />
( "localhost" =&gt;<br />
(<br />
"socket" =&gt; "{$g['tmp_path']}/php-fastcgi.socket",<br />
"min-procs" =&gt; 0,<br />
"max-procs" =&gt; {$max_procs},</p>
<p dir="auto">So I'm thinking that those two parameters should be reversed either in the function definition or in the calls to the function.</p>
<p dir="auto">Was hoping this would fix the problem where Chrome and IE9 browsers hang out for 20+ seconds after logging into the portal, but unfortunately it doesn't.  I'm also hoping someone can verify that $max_requests applies to the maximum concurrent connection setting on the captive portal settings page.</p>
<p dir="auto">Thanks,<br />
Mike</p>
]]></description><link>https://forum.netgate.com/topic/35647/captive-portal-maximum-concurrent-connections-setting-ignored</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 04:29:02 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/35647.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 22 Jul 2011 03:31:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Captive portal "maximum concurrent connections" setting ignored on Wed, 27 Jul 2011 20:39:54 GMT]]></title><description><![CDATA[<p dir="auto">Committed.<br />
For the default value i leave it as it is for now.</p>
]]></description><link>https://forum.netgate.com/post/288926</link><guid isPermaLink="true">https://forum.netgate.com/post/288926</guid><dc:creator><![CDATA[eri--]]></dc:creator><pubDate>Wed, 27 Jul 2011 20:39:54 GMT</pubDate></item><item><title><![CDATA[Reply to Captive portal "maximum concurrent connections" setting ignored on Wed, 27 Jul 2011 20:35:03 GMT]]></title><description><![CDATA[<p dir="auto">I think I solved the problem; in /etc/inc/system.inc, there is a problem with the system_generate_lighty_config() function.  Shouldn't this block:</p>
<p dir="auto">if(!$maxprocperip and $maxprocperip &gt; 0)<br />
$captive_portal_mod_evasive = "evasive.max-conns-per-ip = {$maxprocperip}";<br />
else<br />
$captive_portal_mod_evasive = "";</p>
<p dir="auto">be changed to this:</p>
<p dir="auto">if($maxprocperip and $maxprocperip &gt; 0)<br />
$captive_portal_mod_evasive = "evasive.max-conns-per-ip = {$maxprocperip}";<br />
else<br />
$captive_portal_mod_evasive = "evasive.max-conns-per-ip = 4";</p>
<p dir="auto">I don't think there should be a ! in the if() statement above, should there?  I don't think there are any cases which would trigger the first branch of the "if" statement – so $captive_portal_mod_evasive will always be a blank string.  Shouldn't that default to 4?  In any case, changing the code to the above fixed my problem with Chrome and IE9.</p>
<p dir="auto">Mike</p>
]]></description><link>https://forum.netgate.com/post/288922</link><guid isPermaLink="true">https://forum.netgate.com/post/288922</guid><dc:creator><![CDATA[spookycave]]></dc:creator><pubDate>Wed, 27 Jul 2011 20:35:03 GMT</pubDate></item><item><title><![CDATA[Reply to Captive portal "maximum concurrent connections" setting ignored on Mon, 25 Jul 2011 18:24:04 GMT]]></title><description><![CDATA[<p dir="auto">The 7/24/2011 snapshot did change the behavior, but it doesn't seem like it's completely fixed.  Now, PHP_FCGI_CHILDREN and max_procs seem to be based on how much memory you have, with a starting value of "1" and then modified upwards the more memory you have.  It still doesn't seem to pay attention to the "maximum concurrent connections" setting on the [Service -&gt; Captive Portal] page.</p>
<p dir="auto">It also doesn't fix the IE9 and Chrome problem where the home page times out.  If you get a chance, can you clarify how the max connections per IP works and which settings control it?  I think the main cause of IE9/Chrome timing out is that they try to open more than 16 connections, but somewhere in pfsense there seems to be a hard limit of 16 – wondering if you can confirm that is correct, and if there is a way to adjust that?</p>
<p dir="auto">thanks,<br />
Mike</p>
]]></description><link>https://forum.netgate.com/post/288555</link><guid isPermaLink="true">https://forum.netgate.com/post/288555</guid><dc:creator><![CDATA[spookycave]]></dc:creator><pubDate>Mon, 25 Jul 2011 18:24:04 GMT</pubDate></item><item><title><![CDATA[Reply to Captive portal "maximum concurrent connections" setting ignored on Fri, 22 Jul 2011 08:55:15 GMT]]></title><description><![CDATA[<p dir="auto">Try latest snapshots it might help fixing this.</p>
]]></description><link>https://forum.netgate.com/post/288268</link><guid isPermaLink="true">https://forum.netgate.com/post/288268</guid><dc:creator><![CDATA[eri--]]></dc:creator><pubDate>Fri, 22 Jul 2011 08:55:15 GMT</pubDate></item></channel></rss>