UI3 Connection refused/NGINX 502 Bad Gateway - TCP backlog

Nathan

Getting the hang of it
Joined
Dec 18, 2016
Messages
56
Reaction score
29
Hi,

Has anyone else started running into problems with Blue Iris refusing connections during the load of the UI3 web interface?
During the initial load of the UI3 with all of the thumbnails and assets, I will commonly get a 502 Bad Gateway because the BI port isn't accepting the connection after the burst. It feels as if the listen() backlog is somehow too low for the accepting threads in my system. I have contacted Ken and he has looked into it and thought he found something but it has not resolved it for me, so I thought I'd check if anyone else has run into this.

The same issue happens without NGINX but instead of a 502, I get a failed HTTP request.

Latest Blue Iris, i7-6700 w/QuickSync and 12 cameras all direct to disk. CPU usage around 30%.

I am able to reproduce this using parallel netcat connections but it is more easily demonstrated with tcpgoon (dachad/tcpgoon).

This is a test showing 20 connections with 0 delay to Blue Iris and then 20 to the Windows Netbios port (139) with no failures.
If I increase the delay (-s) then BlueIris is able to accept them all.

Code:
$ tcpgoon run -c 20 -s 0 -i60 -y 192.168.69.51 81
Total: 20, Dialing: 0, Established: 0, Closed: 0, Error: 0, NotInitiated: 20
--- 192.168.69.51:81 tcp test statistics ---
Total: 20, Dialing: 0, Established: 6, Closed: 8, Error: 6, NotInitiated: 0
--- tcpgoon execution statistics ---
Total established connections: 14
Max concurrent established connections: 14
Number of established connections on closure: 6
Response time stats for 14 successful connections min/avg/max/dev = 486µs/705µs/1.187ms/175µs
Time to error stats for 6 failed connections min/avg/max/dev = 416µs/506µs/622µs/64µs

$ tcpgoon run -c 20 -s 0 -i60 -y 192.168.69.51 139
Total: 20, Dialing: 0, Established: 0, Closed: 0, Error: 0, NotInitiated: 20
--- 192.168.69.51:139 tcp test statistics ---
Total: 20, Dialing: 0, Established: 20, Closed: 0, Error: 0, NotInitiated: 0
--- tcpgoon execution statistics ---
Total established connections: 20
Max concurrent established connections: 20
Number of established connections on closure: 20
Response time stats for 20 successful connections min/avg/max/dev = 3.917ms/4.457ms/5.151ms/313µs
 

Nathan

Getting the hang of it
Joined
Dec 18, 2016
Messages
56
Reaction score
29
I worked with Ken to prove out the problem and he believes he has fixed it in 5.2.7.1 (to be released today).
 

Nathan

Getting the hang of it
Joined
Dec 18, 2016
Messages
56
Reaction score
29
Confirmed that 5.2.7.1 fixes this problem.
 
Top