Confd end user session timeout

Hi,
I am facing an intermittent issue. It happens once in 100 runs. Following is the code:
maapi.start_user_session(maapi_socket, user, context, groups, “127.0.0.1”, _confd.PROTO_TCP)
tid = maapi.start_trans(maapi_socket, _confd.RUNNING, _confd.READ_WRITE)

maapi.create(maapi_socket, tid, base_path)
maapi.apply_trans(maapi_socket, tid, False)
maapi.finish_trans(maapi_socket, tid)
sleep(0.2) // Adding sleep here to give enough time to confd for processing.
maapi.end_user_session(maapi_socket)

It blocks at the last line of the code and comes out after timeout. I tried increasing timeout to 5 mins. Still it does not end user session. Is there any way to find why confd gets blocked? Please advise.

No sleep should be necessary. Are you using the same socket with other threads or processes? One socket per thread/process is the golden rule.

Example issue as a reference:

1 Like