I have had this issue for a while, so I think it is best to report it.
I have a export of a container that is not that big:
stanislas@xps ~> ll notthatbigct.tar.gz .rw-r--r-- 3,5G stanislas wheel 29 janv. 14:04 notthatbigct.tar.gz
When I import it, it uses an enourmous amount of RAM (more than 10 GB), causing my computer to freeze a bit:
Then it fails:
stanislas@xps ~> lxc import notthatbigct.tar.gz Importing container: 100% (821.38MB/s)Error: Post http://unix.socket/1.0/containers: EOF
This is an Arch Linux container on Arch Linux, but I had this problem a few months ago on an Ubuntu CT on Ubuntu. LXD is installed from snap.