Mysql2::Error: Out of sort memory, consider increasing server sort buffer size using docker-compose.yml

  docker, docker-compose, mysql, mysql-workbench

Hi I’m building a rails app and I imported lots of data and inserted into the database. Some tables are okay and some tables have some errors that says out of sort memory.

SQL ERROR

Mysql2::Error: Out of sort memory, consider increasing server sort buffer size

How do you increase server sort buffer size using the docker-compose.yml command?

I’ve tried this one:

version: '3'
services:
  db:
    image: mysql:latest
    command:
      - --default-authentication-plugin=mysql_native_password
      - --innodb-buffer-pool-size=402653184

I did add this command:

--innodb-buffer-pool-size=402653184

but I’m still getting the same error that it is out of memory. Is there any way to increase the buffer size using the docker-compose.yml

Source: StackOverflow

One Reply to “Mysql2::Error: Out of sort memory, consider increasing server sort buffer size using docker-compose.yml”

LEAVE A COMMENT