Out of memory

I am keep getting Out of Memory when I try to import my library on a fresh install of beets using docker container from linuxserver.io.

I also tried to divide my library into smaller portions into one artist each however I am still getting out of memory

Also tried to run beets with nice but it always fails during the ffmpeg re-encoding.

error: convert: couldn’t invoke ‘ffmpeg -i /music/english/albums/a/xxxxxxxxxxxx.mp3 -y -ab 320k -ac 2 -ar 48000 /tmp/tmpv5zvVk.mp3’: [Errno 12] Out of memory