MySQL memory allocation error - sort_buffer_size tweak

Skip to first unread message

Kevin Bowrin

Oct 17, 2022, 3:38:20 PM10/17/22
to AtoM Users
Hello all,

Just wanted to note that one of our AtoM installations was logging "Memory allocation error 1038 Out of sort memory" and returning 500 errors when generating finding aids and looking at the "Manage jobs" page.

We were able to bump the sort_buffer_size to 1048576 bytes (4 times the default) by adding "sort_buffer_size = 1048576" to the mysqld.conf file under the recommend optimizer_switch line. That seems to have fixed the problem.

I'm not recommending this for all AtoM users (I'm a bit fuzzy on what the performance impact of this tweak will be) but if you're experiencing something similar it's at least something to look at.

Kevin Bowrin
Carleton University Library

Dan Gillean

Oct 20, 2022, 9:17:33 AM10/20/22
Hi Kevin, 

Thanks for sharing your workaround! 

I would be curious to know how big a PDF it was that caused this error, and how much RAM your AtoM (2.6?) installation has, as I imagine that both of these factors will impact this issue. 


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
he / him

You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages