Hey everone! I just got the weirdest error message...
# general
f
Hey everone! I just got the weirdest error message when I tried to run a Pex from within a container. The run was scripted with Python Docker SDK (sorry I probably messed up the indentation):
1
Copy code
File "<frozen runpy>", line 198, in _run_module_as_main\n  File "<frozen runpy>", line 88, in _run_code\n  File "/app.pex/__main__.py", line 97, in <module>\n  File "/app.pex/__main__.py", line 20, in __maybe_install_pex__\n  File "/app.pex/.bootstrap/pex/layout.py", line 331, in maybe_install\n  File "/app.pex/.bootstrap/pex/layout.py", line 175, in _install\n  File "/app.pex/.bootstrap/pex/layout.py", line 234, in extract_dist\n  File "/usr/local/lib/python3.11/zipfile.py", line 1664, in extract\n    return self._extract_member(member, path, pwd)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/app.pex/.bootstrap/pex/common.py", line 207, in _extract_member\n  File "/usr/local/lib/python3.11/zipfile.py", line 1736, in _extract_member\n    shutil.copyfileobj(source, target)\n  File "/usr/local/lib/python3.11/shutil.py", line 200, in copyfileobj\n    fdst_write(buf)\nOSError: [Errno 28] No space left on device\n'
I have plent of disk space so this is definitely not an issue, might be a Pex internal thing? Also, it worked on the second try after I tried running the docker image directly.
e
This is absolutely not a Pex thing - no space left on device - it's real and it means what it says. Now the Pex part is only that PEX files are zips and when you 1st run them, they self extract to disk 1st. So you must have less disk space than needed to self-extract the PEX zip to the PEX_ROOT dir. That directory defaults to ~/.pex but a tmp dir is used if that dir is not writable.
f
Would that include a situation where the
.pex
dir does not exist? Don't
/tmp
dirs use RAM rather than disk, maybe I'm running out of memory?
My disk has 350gb free, so I am definitely not running out of storage. Not sure if Docker puts any limits on storage, I'll have to google that.
No, I'm not running out of memory either, it must be something else.
Ah ok, this seems like a Docker issue on my end, I am getting some other OOS messages now as well from the docker daemon. So nothing PEX related! Thank you for responding.
Yes, OSX uses a Linux VM for running docker under the hood that uses a disk that you need to manage storage for. Just in case anyone runs into the same issue! My fault for being a noob about Docker on OSX.