REST Services Pending records stuck

Dear Experts,
I have many forms which are having REST Services activated. All the records are submitted to my end API except for some of them. When I check the log, the form had 63 pending records and these records are pending for more than two weeks.


What is the solution to resubmit these records or any other walkarround.

Thank you,

Any response on this?

Dear @Kal_Lam, kindly help me. I am in trouble with this.

Hi @esmatullaharifi, the issue may lie with the client consuming the data. Can you please check if the pending records have anything unique about them that might not be accounted for on your side?

2 Likes

Just to elaborate on Josh’s response here: the “3x” in “Pending (3x)” means we tried three times to POST the submission to your external server. The “Read timed out (read timeout=30)” in the error message you posted means that no response from your external server was received in 30 seconds while we tried to communicate with it.

2 Likes

I have a similar situation where I am getting ‘Pending (3x)’ for some submissions that were submitted over 2 weeks ago and appear stuck in that state. Other submissions with the same error (a problem on our REST server side) and are properly reported as ‘Failed’.

The way we solve the problem of how to resubmit the failed submittions is to use api to get the json for the submission and then have an interface to our REST server that can process the json allowing us to resubmit the submission manually to our REST server after the failure:
ie https://kf.kobotoolbox.org/api/v2/assets/<asset_id>/data/?format=json&query={“_id”:“<submission_id>”}

But, now that I have corrected the problem on our REST server and have resubmitted manually, I don’t want the submissions listed as ‘Pending (3x)’ to be submitted automatically to our REST server creating a duplicate submission.

Is there a way to ensure those stuck in the ‘Pending’ state don’t get automatically submitted? Is there a way to change their status manually? What causes the submissions to get stuck in the ‘Pending’ state?

Just bumping this thread to find possible root cause.

I am also facing the exact same problem. Some of the submissions got stuck in pending state as the backend service went offline for a while. When it came back online only new submissions have been processed successfuly and older ones still stuck in pending state. Also these submissions havent been recieved by backend service after the server came online. I had to push them manually. Has anyone found fix or root cause for this issue?

Also adding to the thread,

I had a bunch of pending and failed records start appearing in our REST service a couple weeks ago - all with the same error message (Authentication Required). After I fixed the random bug, I was able to get the failed records to resubmit successfully by clicking the red arrow retry icon, but the pending records have been stuck in the same state for 2-3 days.

Is there a way to manually initiate a resubmission attempt for the pending records?

Update: The 135 records are still stuck pending. It shows the last submission retry was last Tuesday, so has been almost a full week. The issue is fixed, so once they are able to be rebumitted it should work…just stuck waiting…

@Kal_Lam do you know of any way to help with this? These records are still stuck pending…

Hello @mike.destaubin,

It seems that the pending submissions eventually succeeded?

Can you confirm, please?

Nope, they did not.

1 Like