cancel
Showing results for 
Search instead for 
Did you mean: 

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

k-mambo
New Contributor III

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?

1 ACCEPTED SOLUTION

rocuinneagain
Valued Contributor
Valued Contributor

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.

 

View solution in original post

2 REPLIES 2

rocuinneagain
Valued Contributor
Valued Contributor

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.

 

Thanks for answer.

First of all, there is no code that explicitly performs hclose for each process, and Unix Domain Socket is being used when performing IPC.

I don't know why the above problem occurs on a localhost, not a remote.