encorej / acra

Automatically exported from code.google.com/p/acra
0 stars 0 forks source link

Some crash reports are being sent multiple times #63

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set a low SocketTimeout for ACRA (or somehow delay the response from your 
ACRA server (GoogleDocs))
2. Send a crash report.

What is the expected output? What do you see instead?
The report should be sent once.
Instead some reports are sent dozens of times as can be seen by reports with 
the same reportId.

I see this regularly from out in the wild.

I have seen a single instance on one of my test devices.
In that instance it was clearly that the GoogleDoc server had been contacted 
but that the Socket timed out (SocketTimeOutException) while the client waited 
for a response from the server. In which case the crash report is not deleted 
and will be resent later. And if the device generally gets a slow response from 
GoogleDocs (or whatever ACRA server is used) then it will often time out 
repeatedly, getting resent each time the app starts, which in my case can be 
dozens of times a day.

Solution might be to use a RequestRetryHandler to retry the post a couple of 
times after increasing the SocketTimeOut period. At least this would cause the 
resends to be sent clumped together instead of spread of days/weeks. Normal 
pattern is to double the timeout each time it is attempted.

Original issue reported on code.google.com by william....@gmail.com on 16 Jul 2011 at 7:38

GoogleCodeExporter commented 8 years ago
Fixed in Rev#722 (4.3.0)
Added a HttpRequestRetryHandler that will retry Requests failing due to 
SocketTimeOutException. Max number of retries can be specified as 
aReportCrashes annotation. Each retry double the number of millis defined for 
SocketTimeOut (in ReportCrashes).

THis means that its possible that you will receive multiple of a report as it 
is sent and then immediately retried. But they should all occur together and 
shouldn't keep showing days and weeks later. If you do get lots of multiples 
occurring then increase the value of ReportCrashes#socketTimeOut.

Original comment by william....@gmail.com on 17 Jul 2011 at 11:38

GoogleCodeExporter commented 8 years ago

Original comment by kevin.gaudin on 7 Sep 2012 at 9:37