I enabled 2 driverthreads each on both nsssl and nssock on our Docker system, 
and I think it's working ,based on these driver stats:

thread nsssl:1 module nsssl received 5K spooled 0 partial 5K errors 0
thread nsssl:0 module nsssl received 5K spooled 0 partial 5K errors 0
thread nssock:1 module nssock received 135 spooled 0 partial 135 errors 0
thread nssock:0 module nssock received 136 spooled 0 partial 136 errors 0

Still seeing a huge amount of these in the log though:
[10/Nov/2023:16:08:08][37.7fb2857fa640][-driver:nsssl:0-] Notice: ... 
sockAccept accepted 2 connections
[10/Nov/2023:16:08:16][37.7fb286ffd640][-driver:nsssl:1-] Notice: ... 
sockAccept accepted 2 connections
[10/Nov/2023:16:08:17][37.7fb2857fa640][-driver:nsssl:0-] Notice: ... 
sockAccept accepted 2 connections
[10/Nov/2023:16:08:21][37.7fb286ffd640][-driver:nsssl:1-] Notice: ... 
sockAccept accepted 2 connections
[10/Nov/2023:16:08:26][37.7fb2857fa640][-driver:nsssl:0-] Notice: ... 
sockAccept accepted 2 connections

I'll leave it running anyway, and see how it goes.

thanks!
Brian
________________________________
From: Gustaf Neumann <neum...@wu.ac.at>
Sent: Thursday 9 November 2023 3:27 pm
To: naviserver-devel@lists.sourceforge.net 
<naviserver-devel@lists.sourceforge.net>
Subject: Re: [naviserver-devel] A selection of messages appearing in our error 
logs



On 08.11.23 15:42, Brian Fenton wrote:
Also regarding configuring a second driver thread - just to be clear are you 
referring to this mail you sent back in 2016 
https://sourceforge.net/p/naviserver/mailman/message/35502664/  i.e. enable 
reuseport and set driverthreads = 2? It's unclear to me if this has benefit 
when running Naviserver in a Docker container - definitely beyond my level of 
comprehension. See 
https://github.com/moby/moby/issues/7536#issuecomment-1039443599 for discussion 
of SO_REUSEPORT and Docker.

SO_REUSEPORT allows multiple sockets on the same host to bind to the same port 
at the same time, therefore, multiple driver threads can listen at the same 
time at the same port. I do not see, why this should not be possible in a 
container, ... but i am not a container expert. You can try a configuration 
with two driver threads, if it does not reduce the number of entries, then undo 
it.


On a configuration with e.g. two spooler threads, it should look like the 
following, distributing the requests more or less evenly


   thread nsssl:1 module nsssl received 890K spooled 422 partial 437K errors 0
   thread nsssl:0 module nsssl received 935K spooled 27K partial 491K errors 0


If the load distribution does not work on your docker machine (only one driver 
thread is doing all the work), then a configuration with two driver threads is 
indeed useless. Since the driver threads will work on different cores, this 
improving concurrency and scalability. Giving cores something to do is always 
preferable. But also, when one is defining two driver threads for the same 
port, don't expect that the messages will go away completely.


3. "exiting: exceeded max connections per thread" - actually we used to have 
"connsperthread" set to 10000, but I reduced to 1000 when we moved to Linux, as 
I noticed that was the value in latest OpenACS config, even though the default 
is still 10000 
https://bitbucket.org/naviserver/naviserver/src/main/openacs-config.tcl  Is 
1000 the recommended value for OpenACS?

The value of 1000 is probably a "traditional" value, which is forgiving for 
sloppy developers not cleaning up their garbage after a request. I have 
commented out the line in the repository such that users don't draw wrong 
conclusions.


-g

_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to