# dcc.Download() takes a long time or does not finish with a tiny bit more data. I

**URL:** <https://community.plotly.com/t/dcc-download-takes-a-long-time-or-does-not-finish-with-a-tiny-bit-more-data-i/75967>\
**Category:** Dash Python\
**Created:** [June 9, 2023, 12:10pm UTC](https://community.plotly.com/t/dcc-download-takes-a-long-time-or-does-not-finish-with-a-tiny-bit-more-data-i/75967 "2023-06-09T12:10:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Volodia](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@Volodia](https://community.plotly.com/u/Volodia)\
**Post date:** [June 9, 2023, 12:10pm UTC](https://community.plotly.com/t/dcc-download-takes-a-long-time-or-does-not-finish-with-a-tiny-bit-more-data-i/75967/1 "2023-06-09T12:10:43Z")

</div>

**Describe your context**  
`dcc.Download()` takes a long time or does not finish with a tiny bit more data. It works with smaller amounts of data. There is no error thrown in the console. Trying to send a dataframe with 27k rows. It seems `dcc.send_data_frame()` is very inefficcent. It works when the download format is csv, but not with xlsx.

- replace the result of `pip list | grep dash` below

```auto
dash 2.9.2
dash-bootstrap-components 1.4.1
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table 5.0.0

```

- if frontend related, tell us your Browser, Version and OS
  - OS: W11
  - Browser chrome
  - Version 112.0.5615.49 (Official Build) (64-bit)

**Describe the bug**

`dcc.Download()` takes a long time or does not finish with a tiny bit more data. It works with smaller amounts of data. There is no error thrown in the console. Only the waitress task queue is increasing:

WARNING:waitress.queue:Task queue depth is 1  
WARNING:waitress.queue:Task queue depth is 1  
WARNING:waitress.queue:Task queue depth is 1  
WARNING:waitress.queue:Task queue depth is 2  
WARNING:waitress.queue:Task queue depth is 1  
WARNING:waitress.queue:Task queue depth is 2  
WARNING:waitress.queue:Task queue depth is 3  
WARNING:waitress.queue:Task queue depth is 4  
WARNING:waitress.queue:Task queue depth is 5  
WARNING:waitress.queue:Task queue depth is 6

**Expected behavior**

The download should be done in seconds.

**Screenshots**

[![image](https://user-images.githubusercontent.com/3391614/231296901-01746f01-ca3a-4faf-97bc-d23a362ce380.png)](https://user-images.githubusercontent.com/3391614/231296901-01746f01-ca3a-4faf-97bc-d23a362ce380.png)

---

<div class="post-metadata">

**Author:** ![Emil](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emil/32/31734_2.png) [@Emil](https://community.plotly.com/u/Emil)\
**Post date:** [June 9, 2023, 12:21pm UTC](https://community.plotly.com/t/dcc-download-takes-a-long-time-or-does-not-finish-with-a-tiny-bit-more-data-i/75967/2 "2023-06-09T12:21:15Z")

</div>

Could you post a MWE, i.e. code that runs and reproduces the error? How large is the data? How long does it take to write the dataframe to xlsx to the local disk? Do you have any timeouts and/or size limitations in your production setup?
