dordnung / System2

System2 Extension for Sourcemod
59 stars 16 forks source link

7Z ERROR: Can't allocate required memory! #6

Closed T1MOXA closed 6 years ago

T1MOXA commented 6 years ago

Оn one of the servers there was a problem.

"/csgo/addons/sourcemod/data/system2/linux/amd64/7z" a -t7z "/csgo/demos/awp_lego_2.7z" "/csgo/demos/awp_lego_2.dem" -mmt -mx9

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Xeon(R) CPU E3-1271 v3 @ 3.60GHz (306C3),ASM,AES-NI)

Scanning the drive:
1 file, 60745454 bytes (58 MiB)

Creating archive: /csgo/demos/awp_lego_2.7z

Items to compress: 1

ERROR: Can't allocate required memory!

Maybe you know what the problem is ?

T1MOXA commented 6 years ago

I take it this is due to lack of RAM ?

T1MOXA commented 6 years ago
free -m
              total        used        free      shared  buff/cache   available
Mem:            958         733          14           1         210         159
Swap:           511         225         286
dordnung commented 6 years ago

Sorry, I was never notified about this issue :flushed: Did the trick to use a lower compression level worked out?

T1MOXA commented 6 years ago

Yes, with less compression there are no problems. But I just increased the amount of RAM, for the server is enough but for compression is not :)

dordnung commented 6 years ago

Alright, great to hear

ihoudjedje commented 5 years ago
free -m
              total        used        free      shared  buff/cache   available
Mem:            958         733          14           1         210         159
Swap:           511         225         286

This way of freeing up the memory worked for me :rocket:

varunawass commented 5 years ago

I was getting "can't allocate required memory" error in 7za command line tool in Windows 64bit and the solution was to use the 7zip 64bit installer and use the same command using the installed 7z.exe.

I guess 7za command line tool is 32bit and the file that I was trying to compress was 150GB which is too big and 7zip was trying to allocate more memory than 32bit supports.

ethanwa commented 4 years ago

I was getting "can't allocate required memory" error in 7za command line tool in Windows 64bit and the solution was to use the 7zip 64bit installer and use the same command using the installed 7z.exe.

I guess 7za command line tool is 32bit and the file that I was trying to compress was 150GB which is too big and 7zip was trying to allocate more memory than 32bit supports.

Just want to confirm that this fixed the issue for me as well.

sammasri commented 3 years ago

For me this worked: reducing the number of working threads: add -mmt2 or -mmt4

nickdurcholz commented 1 year ago

Found this bug after some googling. Our issue was the same error but we got it while extracting and archive by running a self-extracting zip created with 7za v19.0. The extractor was started by a non-interactive instance of powershell (v5.1), and the issue was the prompt to overwrite existing files mixed with a non-interactive shell. Providing the -y switch to the extractor fixed the error in this case.