Hi,
the maximum number of MAVIS processes forked by the "external" module is controlled using "childs max" and defaults to 20, so yes, you can max out memory if your "instances max" (the upper limit of server processes) isn't limited reasonably. By default, the "external" module will run "childs min = 4" and start additional ones if further requests come in and the "max" isn't yet reached. MAVIS backend processes are being reused and won't be terminated.
Regarding the number of worker processes: The load-balancing algorithm is detailed in https://projects.pro-bono-publico.de/event-driven-servers/doc/spawnd.html#AEN493 -- to copy-paste from there:
spawnd allows configuration of upper and lower limits for users and processes. The distribution algorithm will try to assign new connections to one of the running servers with less than users_min connections. If all servers already have at least users_min active connections and the total number of servers doesn't exceed servers_max, an additional server process is started, and the connection is assigned to that process. If no more processes may be started, the connection is assigned to the server process with less than users_max users, which serves the lowest number of connections. Otherwise, the connection will stall until an existing connection terminates.
OOM behavior is mostly undefined. I think the "external" module can handle a fork() failure, but wouldn't vouch for that and frankly don't know how that interacts with systemd memory boundaries.
Cheers,
Marc
--
You received this message because you are subscribed to the Google Groups "Event-Driven Servers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to event-driven-ser...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/event-driven-servers/8d97e740-cd2b-4583-9b2b-5925170caf99n%40googlegroups.com.
Hi Andrzej,
- Do I understand correctly, that the "childs max" is applied per-worker, meaning that effective maximum number of MAVIS backend processes will be instances_max*childs_max?
- What happens when the number of requests (as determined by users_max) is higher than the number of backend processes? Are they queued by the worker process?
- "MAVIS backend processes are being reused and won't be terminated." - I saw the number of perl processes spike when serving requests and drop afterwards, so it would seem they are terminated after all.
- "Otherwise, the connection will stall until an existing connection terminates." - Does this mean that the listener receives a SYN from TACACS+ client, but doesn't respond with a SYN+ACK until a slot opens?
- Is it expected behaviour for tac_plus-ng workers to terminate when "retire limit" and "retire timeout" are not configured? This is what I saw in my tests and I wonder if I managed to somehow crash a worker process.
No, the workers should not terminate voluntarily without retire options being set. This might be a bug, or an OOM issue. You could check syslog for crash infos, the daemon should log such issues.
Cheers,
Marc