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?