to get control over your situation you have 2 key methods:

  • $SYSTEM.License.MaxConnections() returns the maximum number of connections a user can make while consuming one license unit.
  • $SYSTEM.License.ConnectionCount() returns the number of connections currently associated with the given UserIdentifier. The range of return values is normally 0 through MAXCONNECTIONS. If the value exceeds MAXCONNECTIONS then more than the allowable number of concurrent connections were attempted for a given ID and the system has transitioned to a mode of one connection per license for this UserIdentifier.

So you have to check if your user has exhausted its available connections and block him.
It's anyhow quite interesting how these users are able to trigger so many connections.

I share your suggestion!

When I started with Docker I was highly skeptical after many years with VMware starting before their first release.
It was a hard exercise and I took quite a while digging through docs and helps.
My main problem was that everything was so generic and not at all specific to IRIS (or Caché).

Meanwhile, it became so common to me that I stopped running reviews on packages without docker.
Docker allowed me to have a "clean desk" after testing.
In addition. I saw through this activity so many valid variations that
I doubt to decide how to start and where.
On the other hand, I see in OEX ~450 tested and working examples (a dozen PR still pending) 
Following these examples and trying to understand what will be achieved
could be good food for training designers. 
 

You may have only 1 command: in each build
the 2nd overwrites the first

  iris:
    image: intersystemsdc/iris-community:latest
    command: --check-caps false
    container_name: tls-ssl-iris
    networks:
      app_net:
        ipv4_address: 172.16.238.20
    volumes:
      - ./iris-config-files:/opt/config-files
      # Mount certificates files.
      - ./certificates/CA_Server.cer:/usr/irissys/mgr/CA_Server.cer
      - ./certificates/iris_server.cer:/usr/irissys/mgr/iris_server.cer
      - ./certificates/iris_server.key:/usr/irissys/mgr/iris_server.key
    hostname: iris
    # Load the IRIS configuration file ./iris-config-files/iris-config.json
    command: ["-a","sh /opt/config-files/configureIris.sh"] 

this worked as multi-line 

command: 
    - -a
    - sh /opt/config-files/configureIris.sh 
      - --check-caps false

BUT  
         command: ["-a","sh /opt/config-files/configureIris.sh","--check-caps false"]

works as well 
 

in my various examples I took these strategies:

  • try to run the Py code in PY shell in a REAL terminal or docker command line console
  • error messages directly from the shell are much more useful  
  • insert temporary print(...) statements at suspicious points
  • what I see by COS <THROW>  is often more obfuscation than a hint  

to my experience, your 'KeyError' indicates that you try to get a value
from a non-existing global or subscript. in COS it would be <UNDEF>

  • first I check the logical qualification - e.g. playing chess
  • next check the skills in estimating results of simple mathematical calculations  or simple mechanical ckecks or puzzle strategies (without paper and pencil) 
  • next, I observe the operation of their mobile phone and ask for explanations
  • the very last might be t take a look into suggestions like yours

With 2 very successful sons in software, internet, and project engineering (49yrs. + 36yrs.)
I have a valid benchmark for my strategy.