Project

General

Profile

Bug #6421

Nginx keepalive_timeout 65 breaking some captive portal redirects

Added by Chris Linstruth over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
Captive Portal
Target version:
Start date:
05/31/2016
Due date:
% Done:

0%

Estimated time:
Affected Version:
All
Affected Architecture:

Description

Using nginx as the captive portal web server with keepalive_timeout 65 causes attempts to access sites after authentication to use same TCP/HTTP session to captive portal instead of a new session to the destination site. This gives the appearance of not being redirected to the destination site after login with the portal page just "hanging" after login is pressed. This only manifests itself if the same destination site is attempted by the client both pre- and post-auth.

Setting keepalive_timeout 0 in the portal nginx config forces clients start a new TCP/HTTP session for each web element and corrects this. A short but > 0 value like 1 or 2 should keep most of the keepalive benefits during portal page load yet cause new TCP sessions to be used after all but very quick portal logins.

It looks like lighttpd had:

server.max-keep-alive-requests = 15
server.max-keep-alive-idle = 30

I am not certain but this could explain some of the strange login hangs/timeouts I used to see.

Associated revisions

Revision dbc5fd33 (diff)
Added by Chris Buechler over 3 years ago

Set keepalive_timeout 0 where captive portal in use, and update otherwise to nginx's current default of 75. Ticket #6421

Revision 54e7222e (diff)
Added by Chris Buechler over 3 years ago

Set keepalive_timeout 0 where captive portal in use, and update otherwise to nginx's current default of 75. Ticket #6421

Revision 754f7091 (diff)
Added by Chris Buechler over 3 years ago

Set keepalive_timeout 0 where captive portal in use, and update otherwise to nginx's current default of 75. Ticket #6421

History

#1 Updated by Chris Buechler over 3 years ago

  • Subject changed from Nginx keepalive_timeout 65 breaking some captive portal logins. to Nginx keepalive_timeout 65 breaking some captive portal redirects
  • Status changed from New to Feedback
  • Assignee set to Chris Buechler
  • Affected Version changed from 2.3.1 to All

Good catch, Chris. Fix pushed to disable the keepalive in captive portal's nginx instances. In that circumstance, the redirect was always problematic, nginx just made the timeout longer. Confirmed situation that would hang on the post-auth redirect every time for just upwards of a minute now immediately redirects post-login.

#2 Updated by Chris Buechler over 3 years ago

  • Status changed from Feedback to Resolved

works

Also available in: Atom PDF