Skip to content

[BUG]: Exporting a year of distributions times out #5477

@awwaiid

Description

@awwaiid

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Bank admins reported that when they try to export a whole year of Distributions (CSV export) that they get a timeout (504 error). When they do a smaller time window, like 6 months or less, it exports without issue. We did some timings and found that it is timing out at 60 seconds.

Expected Behavior

Not to error and somehow (either directly or through an email or something) provide the data.

Steps To Reproduce

  1. Get a user with a lot of data
  2. Go into their distributions, select a large time range (1 year), and export
  3. Get an error!

Environment

Criteria for Completion

  • User is able to export a large amount of distributions
  • Unit / request testing to validate new behavior
  • If there is a new asynchronous method (email), document how this works

Anything else?

We should explore:

  • Adjusting infrastructure timeouts as a short-term fix (increase timeout)
  • Seeing if we can make an estimate of how big the export is and then switch to an email attachment; give the user a toast that says we will email their attachment
  • Look into making the export so fast that we don't have to change the UI

For this issue, we are open to exploring all of these.

Code of Conduct

  • I've read the Code of Conduct and understand my responsibilities as a member of the Ruby for Good community

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions