KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Cannot write to handle N. OS reports: Bad file descriptor

  • Cannot write to handle N. OS reports: Bad file descriptor

    Posted by k-mambo on November 12, 2021 at 12:00 am

    Cannot write to handle 11. OS reports: Bad file descriptor

    I’m using 64-bit 4.0 version for Linux.

    The connection from HDB to RDB is intermittently released.

    TP, RDB, and HDB are configured on one server, and the connection between TP and RDB is not disconnected, but the IPC of HDB and RDB is disconnected.

    If this problem occurs, what areas should we look at?

    Or is there a way to automatically reconnect by detecting disconnection?

    k-mambo replied 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • rocuinneagain

    Member
    November 12, 2021 at 12:00 am

    Usually when you see this error it is due to one of:

    1. A fault in the network infrastructure between hosts
    2. One of the involved processes has died unexpectedly
    3. Some code in either your process or the remote has purposefully closed the connection  (hclose)

    There are handlers available in the .z namespace which are helpful to detect events on IPC handles:

    • .z.pc is called after a connection has been closed
    • .z.po is called after a connection has been opened

    These could be implemented to track and attempt to reconnect dropped connections.

    (.z.W is a useful dictionary or current open handles)

    There are some examples such as dotz which is a library building on these features to trace, monitor and control execution.

     

Log in to reply.