# Nextcloud gives MySQL "Memory allocation error: 1038 Out of sort memory"

**URL:** https://forum.yunohost.org/t/nextcloud-gives-mysql-memory-allocation-error-1038-out-of-sort-memory/18263
**Category:** Support apps
**Tags:** nextcloud, mysql, english
**Created:** [December 27, 2021, 4:40am UTC](https://forum.yunohost.org/t/nextcloud-gives-mysql-memory-allocation-error-1038-out-of-sort-memory/18263 "2021-12-27T04:40:19Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![EssDub](https://forum.yunohost.org/user_avatar/forum.yunohost.org/essdub/32/10824_2.png) [@EssDub](https://forum.yunohost.org/u/EssDub)
#### Post date: [December 28, 2021, 7:56pm UTC](https://forum.yunohost.org/t/nextcloud-gives-mysql-memory-allocation-error-1038-out-of-sort-memory/18263/5 "2021-12-28T19:56:55Z")

</div>

I seem to have solved this, at least for now, by increasing the `sort_buffer_size` even further, to `2M`. Now I can access the web GUI and I’m no longer receiving the error 1038.

Sources I followed included:

- [This thread](https://help.nextcloud.com/t/memory-allocation-error-1038-during-connection-to-mysql/120022/16) on the Nextcloud forums
- [This issue](https://github.com/nextcloud/circles/issues/789) on the Nextcloud Github page

There are some suggestions that the Circles app (in Nextcloud) may also be a culprit. I did not do anything to disable it in this case, but I’m pointing it out in case that is helpful to others in a similar predicament.

---

_[View the full topic](https://forum.yunohost.org/t/nextcloud-gives-mysql-memory-allocation-error-1038-out-of-sort-memory/18263)._
