Ubus_invoke() failure is seen with error: UBUS_STATUS_TIMEOUT . while calling script

We are working on Qualcomm devices where we are seeing UBUS_TIMEOUT

VERSION="23.05.4"

167 if (ubus_lookup_id(m_pUbus, "service", &id)){
168 QCMAP_LOG_MSG(MSG_LEGACY_ERROR, "Ubus look_up_id failed");
169 status = false;
170 return status;
171 }
172
173 /* Start test.init script through ubus */
174 blob_buf_init(&b, 0);
175 blobmsg_add_string(&b, "name", ubus_script_name);
176 t1 = blobmsg_open_table(&b, "instances");
177 t2 = blobmsg_open_table(&b, "instance1");
178 ar = blobmsg_open_array(&b, "command");
179
180 // Parse script arguments
181 std::istringstream stream_iter(input_prog);
182 std::string word;
183 while (stream_iter >> std::quoted(word))
184 {
185 blobmsg_add_string(&b, "", word.c_str());
186 }
187
188 blobmsg_close_array(&b, ar);
189 blobmsg_add_string(&b, "user", prog_perm);
190 blobmsg_add_string(&b, "group", prog_perm);
191 blobmsg_close_table(&b, t2);
192 blobmsg_close_table(&b, t1);
193
194 ret = ubus_invoke(m_pUbus, id, "add", b.head, NULL, NULL, UBUS_TIMEOUT);
195 if(ret != 0){
196 QCMAP_LOG_MSG(MSG_LEGACY_ERROR, "Ubus invoke for add failed");
197 status = false;
198 goto out;
199 }

ubus_invoke() failure with error 7(ubus timeout)
Even with increased timeout, same timeout is seen.

The same call works fine for most of the time, whereas very few cases it fails with timeout.

HI Developers,
Can anyone please share some pointers what can be causing this issue ?

Ping to check if any dev can help us guide here

hello,
do you call ubus_send_reply() in the receiver?

By receiver you mean the service serving the request?
The ubus calls we are using are for starting a new procd service.