Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

NX Witness server - too many TCP connections open when using the API

Answered

Comments

1 comment

  • Anderson Chang
    • Network Optix team

    Hi Garry,

    By default, the Nx Server has a limit of 2000 concurrent TCP connections.
    This limit works as built-in DDoS protection and as a resource guard, so that the Nx Server is not overwhelmed by incoming connections.

    To resolve the issue you encountered, please consider the following options.

    1. Reuse the HTTP session.
      Use one keep-alive session with a small connection pool, and do not create a new client for each call.
    2. Close connections you no longer need.
      Close each WebSocket (JSON-RPC, WebRTC signaling) and each media stream when the job is done.
    3. Reuse the session token.
      Get one session token and reuse it until the tasks are finished, then delete it.
      Do not authenticate for every call.
    4. Raise the limit.
      Given the purpose of this limit, we do not recommend raising it unless it is necessary, for example, if the number of clients that will connect and pull streams from the server is expected to exceed the limit.

     

    Please do not hesitate to let us know if you have any concerns or further questions.

    Thank you.

    0

Please sign in to leave a comment.