# TileDBError: \[TileDB::S3\] Error: Direct write failed!

**URL:** <https://forum.tiledb.com/t/tiledberror-tiledb-s3-error-direct-write-failed/311>\
**Category:** Uncategorized\
**Created:** [March 10, 2021, 9:12am UTC](https://forum.tiledb.com/t/tiledberror-tiledb-s3-error-direct-write-failed/311 "2021-03-10T09:12:51Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![stavros](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@stavros](https://forum.tiledb.com/u/stavros)\
**Post date:** [March 10, 2021, 6:48pm UTC](https://forum.tiledb.com/t/tiledberror-tiledb-s3-error-direct-write-failed/311/9 "2021-03-10T18:48:33Z")

</div>

Thanks for reporting this @ilveroluca and @tiphaineruy!

Could you please give us some more details, e.g., how many fragments, their sizes, the subarrays you wrote into for the dense case, etc?

Some comments before we deep dive:

1. It is important to understand all `sm.consolidation*` [config parameters](https://docs.tiledb.com/main/solutions/tiledb-embedded/configuration-parameters), since, if you are using the defaults on huge arrays, you will probably run out of memory.
2. Please check the [consolidation docs](https://docs.tiledb.com/main/solutions/tiledb-embedded/internal-mechanics/consolidation), and especially the topic on dense array amplification in case you write to the array in non-contiguous subarray “patches”.
3. We have a known bug in that you should explicitly pass the `config` object to `tiledb.consolidate` (see discussion [here](https://forum.tiledb.com/t/write-confirmation-question/305/14)).
4. For the dense case and especially if you write reasonably-sized data (e.g., 500MB-1GB) into disjoint subarrays, you can improve performance by just [consolidating the fragment metadata](https://docs.tiledb.com/main/solutions/tiledb-embedded/internal-mechanics/consolidation#fragment-metadata-consolidation) (instead of the actual fragments).

@tiphaineruy, @ihnorton could help us see why there is a regression. Could you please send us any information you can so that we can reproduce the issue on our side?

Thanks!

---

_[View the full topic](https://forum.tiledb.com/t/tiledberror-tiledb-s3-error-direct-write-failed/311)._
