The issue is as you write in your data provider application that timeout and ConfD then handle your data provider failure by closing the control and worker sockets to your data provider application.
Note that if you do a MAAPI call like maapi_get_next() from a the same thread that also is the data provider to serve your maapi_get_next() you will have a deadlock. If this is what you are doing this may explain your timeout.
First a short explanation on data provider failures due to timeouts from the confd_lib_dp man page:
All the callbacks that are invoked via these sockets are subject to timeouts configured in confd.conf, see confd.conf(5). The callbacks invoked via the control socket must generate a reply back to ConfD within the time configured for /confdConfig/capi/newSessionTimeout, the callbacks invoked via a worker socket within the time configured for /confdConfig/capi/queryTimeout. If either timeout is exceeded, the daemon will be considered dead, and ConfD will disconnect it by closing the control and worker sockets.
So basically you have three options here:
1. Make sure you are not in a deadlock situation.
2. Increase the timeout in your confd.conf file to your worst case timeout.
3. For just this callback, and others that may take a long time in your data provider application, call confd_data_set_timeout() with the timeout to extend the timeout to match your worst case for the current callback, i.e. in your case the data provider callback you registered with ConfD.
From the confd.conf man page:
/confdConfig/capi/queryTimeout (xs:duration) [PT120S]
Timeout for a daemon to respond to a worker socket query, see confd_lib_dp(3). If the daemon fails to respond within the given time, it will be disconnected.
From the confd_lib_dp man page:
int confd_data_set_timeout(struct confd_trans_ctx *tctx, int
A data callback should normally complete "quickly", since e.g. the execution of a 'show' command in the CLI may require many data callback invocations. Thus it should be possible to set the /confdConfig/capi/queryTimeout in confd.conf (see above) such that it covers the longest possible execution time for any data callback. In some rare cases it may still be necessary for a data callback to have a longer execution time, and then this function can be used to extend (or shorten) the timeout for the current callback invocation. The timeout is given in seconds from the point in time when the function is called.