Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reports are sent for ever #595

Closed
xi67 opened this issue Aug 17, 2017 · 7 comments
Closed

Reports are sent for ever #595

xi67 opened this issue Aug 17, 2017 · 7 comments

Comments

@xi67
Copy link

xi67 commented Aug 17, 2017

In 4.8.5, an app crash very often and my couchdb was down so the report try to be sent for ever (big amount of data).

Is it possible to limit the number of retry of reports and the number of reports in memory ?

@F43nd1r
Copy link
Member

F43nd1r commented Aug 20, 2017

ACRA will only send 5 reports at once. Currently, reports saved to disk cannot be limited. ACRA should only retry sending a failed report after your application is restarted.

@xi67
Copy link
Author

xi67 commented Aug 22, 2017

The problem is : if acralyzer have a problem or if report can't be integrated because of missing field or everything else, the report will be resent forever.

If a bug occur often the number of report will increase very quickly.
On a fleet of 20 phone with a bug which occur 2-3 times an hour when the acra server return after 10 days we have thousands of report et 40 Go of Data used (all fields activated).

This is a major issue.
If the server can't integrate the report, it should not be resend for ever.

@F43nd1r
Copy link
Member

F43nd1r commented Aug 25, 2017

which http response code is sent by your server if the report cannot be integrated?

@xi67
Copy link
Author

xi67 commented Aug 25, 2017

couchdb was stopped so no http response.
acra was unable to connect

@tslocum
Copy link

tslocum commented Oct 25, 2017

Hello, I've received a report of my app suddenly jumping from a few megabytes of data usage to over a gigabyte, due to constant attempts to send crash reports while my app fails to start a service.

I understand it may be difficult to add a limiting mechanism while the app is just starting to initialize, but perhaps a text file could be created containing a list of timestamps which reports were sent and their corresponding app (package). Old entries could be pruned when checking to keep it slim. This way, if the app recently crashed, we can immediately discard the report and help save users' data/battery.

@F43nd1r
Copy link
Member

F43nd1r commented Nov 14, 2017

For ACRA 5.0.0, there is now a ReportLimiter module available. Example usage:

build.gradle:

dependencies {
    compile 'com.faendir.acra:acra-http:5.0.0-alpha14'
    compile 'com.faendir.acra:acra-dialog:5.0.0-alpha14'
    //1. add limiter to application
    compile 'com.faendir.acra:acra-limiter:5.0.0-alpha14'
}

MyApplication.java:

@AcraCore(reportFormat = StringFormat.JSON)
//2. configure limiter
@AcraLimiter(resIgnoredCrashToast = R.string.toast_text_no_send)
@AcraHttpSender(
        httpMethod = HttpSender.Method.POST,
        uri = "***")
@AcraDialog(
        resText = R.string.crash_dialog_text,
        resTheme = R.style.Theme_AppCompat_Light_Dialog)

@F43nd1r
Copy link
Member

F43nd1r commented Dec 28, 2017

Closing this with the release of ACRA 5

@F43nd1r F43nd1r closed this as completed Dec 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants