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

CSV data import "retry" on timeout causing duplicate entries #328

Open
blms opened this issue Dec 12, 2024 · 0 comments
Open

CSV data import "retry" on timeout causing duplicate entries #328

blms opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@blms
Copy link

blms commented Dec 12, 2024

When importing a large quantity of data, it is possible to trigger a Heroku timeout (30+sec request), which apparently triggers a "retry" and results in duplicate data.

2024-12-12T19:14:14.750757+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/core_data/projects/116/import_data" host=staging.coredata.cloud request_id=6e93b2b2-a01e-4fa0-93d7-b7ec4f864f38 fwd="##.##.##.###" dyno=web.1 connect=0ms service=30114ms status=503 bytes=0 protocol=https

Image

Possible solutions:

  • Not retrying on timeout, and instead allowing whatever is in process to complete, with a message to the user that while the application timed out, their data may be partially present.
  • Not retrying on timeout, and instead deleting all data that was imported during the request. (Maybe some kind of atomic transactions?)
  • Moving the actual import processes to a background task instead of during the request. The only time during which the request needs to stay alive would be during the file upload, which is relatively quick. Of course, this would require resources for a background queue.
@blms blms added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant