thedesolatesoul Expert Licensed User Longtime User Mar 18, 2012 #1 This is maybe not a B4A question but more of a system-level question. Sometimes on an upload the Http Client (using HTTPUtils) throws this exception: Code: org.apache.http.client.ClientProtocolException Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity The stack trace contains internal HTTPClient traces. It seems that the InputStream does not allow a repeatable request. This however does not always happen. When I manually start a Job, the upload goes fine. But when I try to schedule an upload job at some time, the first upload fails but subsequent ones work fine. If it is the server being slow to respond, then why does it work on a manual job start. Shall I be detecting this exception in HandleErrors and try to re-start the job?
This is maybe not a B4A question but more of a system-level question. Sometimes on an upload the Http Client (using HTTPUtils) throws this exception: Code: org.apache.http.client.ClientProtocolException Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity The stack trace contains internal HTTPClient traces. It seems that the InputStream does not allow a repeatable request. This however does not always happen. When I manually start a Job, the upload goes fine. But when I try to schedule an upload job at some time, the first upload fails but subsequent ones work fine. If it is the server being slow to respond, then why does it work on a manual job start. Shall I be detecting this exception in HandleErrors and try to re-start the job?
thedesolatesoul Expert Licensed User Longtime User Mar 18, 2012 #2 For now I have solved this by adding some Retry logic. On a failure with this exception, it retries the upload. What is surprising is that it ALWAYS fails the first attempt and ALWAYS passes the second! Upvote 0
For now I have solved this by adding some Retry logic. On a failure with this exception, it retries the upload. What is surprising is that it ALWAYS fails the first attempt and ALWAYS passes the second!