Skip to content

Help with two questions #1185

Closed
Closed

Description

@zongyangbigpolo

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

What are you trying to accomplish?

1.If my sentry-native is deployed in an offline environment, will crashpad continuously attempt to send crash logs during the offline period, or will it detect when the network is back online before attempting to send the crash logs?
2.If there is no network connection for an extended period and a large number of crashes occur, which are stored locally on the user's machine, is there a limit on the maximum number or size of stored crash files? Or is there any mechanism to delete old crash files from the user's local machine?

How are you getting stuck?

1.If my sentry-native is deployed in an offline environment, will crashpad continuously attempt to send crash logs during the offline period, or will it detect when the network is back online before attempting to send the crash logs?
2.If there is no network connection for an extended period and a large number of crashes occur, which are stored locally on the user's machine, is there a limit on the maximum number or size of stored crash files? Or is there any mechanism to delete old crash files from the user's local machine?

Where in the product are you?

Unknown

Link

No response

DSN

No response

Version

No response

Activity

  1. getsantry commented on Mar 20, 2025

    @getsantry

    Assigning to @getsentry/support for routing ⏲️

  2. moved this to Waiting for: Support in GitHub Issues with 👀 3on Mar 20, 2025
  3. moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 3on Mar 21, 2025
  4. supervacuus commented on Mar 21, 2025

    @supervacuus
    Collaborator

    With version 0.8.2, we enabled the crashpad retry mechanism on all platforms (upstream enables this feature only for iOS). However, this only affects the sending of crashes (when using the crashpad backend).

    There is currently no mechanism in any of the Native SDK transports to attempt to guarantee delivery. If you capture any event and the network is offline, transport will discard the event once a request fails (unless this happens due to rate limiting).

    1.If my sentry-native is deployed in an offline environment, will crashpad continuously attempt to send crash logs during the offline period, or will it detect when the network is back online before attempting to send the crash logs?

    There is no attempt to detect whether the network is offline/online in crashpad, but with version 0.8.2, we enabled its retry mechanism that works in the following way:

    • if a crash report upload fails, it will be persisted for retry (whereas previously, it would marked as skipped due to upload error)
    • the retry will be attempted 5 times, after which the report will be discarded
    • the retry happens
      • on every restart of the crashpad_handler (typically the restart of your application) and
      • every 15 minutes after that

    Your events will likely be discarded even with retries if you have a long offline interval.

    2.If there is no network connection for an extended period and a large number of crashes occur, which are stored locally on the user's machine, is there a limit on the maximum number or size of stored crash files?

    Besides discarding events via the retry mechanism after the five retries mentioned above, we trigger a cleanup of the crashpad database on every sentry_init(). Skipped or processed database entries will be removed if they are older than 2 days or if the entire database grows beyond 8MiB. Of course, if a particular crash dump is larger than 8MiB, it will stay on disk until the application initializes the SDK again (and the upload is successful or all retries fail).

    Similarly, our internal database cleans up all old runs during sentry_init() after sending any remaining envelopes that might have persisted from the last run. There is no prune period or size boundary; if the files from a previous run were processed, they will be immediately deleted.

    So, as you can see, we deliberately try not to fill the disks.

    Or is there any mechanism to delete old crash files from the user's local machine?

    We currently do not expose a mechanism that would safely delete old crash files on behalf of the user besides our automated removal on startup.

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Mar 21, 2025
  6. moved this to Waiting for: Community in GitHub Issues with 👀 3on Mar 25, 2025
  7. zongyangbigpolo commented on Mar 27, 2025

    @zongyangbigpolo
    Author

    really appreciate~~

  8. moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3on Mar 27, 2025
  9. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Mar 27, 2025
  10. locked and limited conversation to collaborators on Mar 27, 2025
  11. converted this issue into a discussion #1190 on Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions