OSError: Errno 28

I am unable to upload files over 25MB through the /api/user-files/upload-file/ api. I have already configured the file size variable. The log says that I don’t have space on the disk, but my VPS has 80GB of space.

can anybody help me ?

[BACKEND][2024-06-27 16:15:48] response = await wrapped_callback( e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py”, line 448, in call e(B
[BACKEND][2024-06-27 16:15:48] ret = await asyncio.wait_for(future, timeout=None) e(B
[BACKEND][2024-06-27 16:15:48] File “/usr/lib/python3.9/asyncio/tasks.py”, line 442, in wait_for e(B
[BACKEND][2024-06-27 16:15:48] return await fut e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py”, line 22, in run e(B
[BACKEND][2024-06-27 16:15:48] result = self.fn(*self.args, **self.kwargs) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py”, line 490, in thread_handler e(B
[BACKEND][2024-06-27 16:15:48] return func(*args, **kwargs) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/django/views/decorators/csrf.py”, line 55, in wrapped_view e(B
[BACKEND][2024-06-27 16:15:48] return view_func(*args, **kwargs) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/django/views/generic/base.py”, line 103, in view e(B
[BACKEND][2024-06-27 16:15:48] return self.dispatch(request, *args, **kwargs) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py”, line 509, in dispatch e(B
[BACKEND][2024-06-27 16:15:48] response = self.handle_exception(exc) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py”, line 469, in handle_exception e(B
[BACKEND][2024-06-27 16:15:48] self.raise_uncaught_exception(exc) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py”, line 480, in raise_uncaught_exception e(B
[BACKEND][2024-06-27 16:15:48] raise exc e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py”, line 506, in dispatch e(B
[BACKEND][2024-06-27 16:15:48] response = handler(request, *args, **kwargs) e(B
[BACKEND][2024-06-27 16:15:48] File “/usr/lib/python3.9/contextlib.py”, line 79, in inner e(B
[BACKEND][2024-06-27 16:15:48] return func(*args, **kwds) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/backend/src/baserow/api/decorators.py”, line 105, in func_wrapper e(B
[BACKEND][2024-06-27 16:15:48] return func(*args, **kwargs) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/backend/src/baserow/api/user_files/views.py”, line 57, in post e(B
[BACKEND][2024-06-27 16:15:48] if “file” not in request.FILES: e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/rest_framework/request.py”, line 442, in FILES e(B
[BACKEND][2024-06-27 16:15:48] self._load_data_and_files() e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/rest_framework/request.py”, line 279, in _load_data_and_files e(B
[BACKEND][2024-06-27 16:15:48] self._data, self._files = self._parse() e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/rest_framework/request.py”, line 354, in _parse e(B
[BACKEND][2024-06-27 16:15:48] parsed = parser.parse(stream, media_type, self.parser_context) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/rest_framework/parsers.py”, line 108, in parse e(B
[BACKEND][2024-06-27 16:15:48] data, files = parser.parse() e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/django/http/multipartparser.py”, line 123, in parse e(B
[BACKEND][2024-06-27 16:15:48] return self._parse() e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/django/http/multipartparser.py”, line 326, in _parse e(B
[BACKEND][2024-06-27 16:15:48] chunk = handler.receive_data_chunk(chunk, counters[i]) e(B
[BACKEND][2024-06-27 16:15:48] File “/baserow/venv/lib/python3.9/site-packages/django/core/files/uploadhandler.py”, line 175, in receive_data_chunk e(B
[BACKEND][2024-06-27 16:15:48] self.file.write(raw_data) e(B
[BACKEND][2024-06-27 16:15:48] File “/usr/lib/python3.9/tempfile.py”, line 613, in func_wrapper e(B
[BACKEND][2024-06-27 16:15:48] return func(*args, **kwargs) e(B
[BACKEND][2024-06-27 16:15:48] OSError: [Errno 28] No space left on device e(B
[BACKEND][2024-06-27 16:15:52] 10.0.1.14:0 - “POST /api/user-files/upload-file/ HTTP/1.1” 500 e(B
[BEAT_WORKER][2024-06-27 16:16:00] [2024-06-27 16:15:41,201: INFO/MainProcess] Scheduler: Sending due task baserow.core.trash.tasks.mark_old_trash_for_permanent_deletion() (baserow.core.trash.tasks.mark_old_trash_for_permanent_deletion) e(B
[EXPORT_WORKER][2024-06-27 16:16:00] [2024-06-27 16:15:41,218: INFO/ForkPoolWorker-1] Task baserow.core.trash.tasks.mark_old_trash_for_permanent_deletion[53ee2e63-6f7a-4a9a-a95e-25478a05f796] succeeded in 0.012626295007066801s: None e(B
[EXPORT_WORKER][2024-06-27 16:16:00] [2024-06-27 16:16:00,028: INFO/MainProcess] Task

Hi!

Can you verify your disk space availability and execute following commands in a shell on your VPS instance:
df -h to check disk space ussage
and
df -ih to check inodes usage?

root@srv525838:~# df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
tmpfs 993K 890 992K 1% /run
/dev/sda1 13M 387K 12M 4% /
tmpfs 993K 1 993K 1% /dev/shm
tmpfs 993K 2 993K 1% /run/lock
/dev/sda15 0 0 0 - /boot/efi
overlay 13M 387K 12M 4% /var/lib/docker/overlay2/5feabc48b54dd1b1102ae18eb3057e85696a6588f18b5fa7c6c58af8277d8bac/merged
overlay 13M 387K 12M 4% /var/lib/docker/overlay2/3dccd57e5e71a705d7b05060a1cd466c6245cc336f43e3aab9fade488cc9c3fd/merged
overlay 13M 387K 12M 4% /var/lib/docker/overlay2/c4e45dae2185995c9704950845265a3df90b89970ffeb536dce91ee30721b1fe/merged
overlay 13M 387K 12M 4% /var/lib/docker/overlay2/1c10f7a8d99061b2bce69d86c7469813ce4de88320172b26058fd17bc9f62258/merged
overlay 13M 387K 12M 4% /var/lib/docker/overlay2/e28278f982ff20bc6597465c4612a4caf40db4cfa596da85be08300664a003e6/merged
overlay 13M 387K 12M 4% /var/lib/docker/overlay2/6a9315f817c78180e8d1bbd841b46fa0a9ea0254f81d2b4962eb42467bcaed7d/merged
overlay 13M 387K 12M 4% /var/lib/docker/overlay2/cb335eed3422cf6268b1f013c4f93d5231c45f9f9cf8f46c68a9af5fdb121489/merged
tmpfs 199K 26 199K 1% /run/user/0

root@srv525838:~# df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 794M 1.6M 793M 1% /run
/dev/sda1 97G 8.9G 88G 10% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda15 105M 6.1M 99M 6% /boot/efi
overlay 97G 8.9G 88G 10% /var/lib/docker/overlay2/5feabc48b54dd1b1102ae18eb3057e85696a6588f18b5fa7c6c58af8277d8bac/merged
overlay 97G 8.9G 88G 10% /var/lib/docker/overlay2/3dccd57e5e71a705d7b05060a1cd466c6245cc336f43e3aab9fade488cc9c3fd/merged
overlay 97G 8.9G 88G 10% /var/lib/docker/overlay2/c4e45dae2185995c9704950845265a3df90b89970ffeb536dce91ee30721b1fe/merged
overlay 97G 8.9G 88G 10% /var/lib/docker/overlay2/1c10f7a8d99061b2bce69d86c7469813ce4de88320172b26058fd17bc9f62258/merged
overlay 97G 8.9G 88G 10% /var/lib/docker/overlay2/e28278f982ff20bc6597465c4612a4caf40db4cfa596da85be08300664a003e6/merged
overlay 97G 8.9G 88G 10% /var/lib/docker/overlay2/6a9315f817c78180e8d1bbd841b46fa0a9ea0254f81d2b4962eb42467bcaed7d/merged
overlay 97G 8.9G 88G 10% /var/lib/docker/overlay2/cb335eed3422cf6268b1f013c4f93d5231c45f9f9cf8f46c68a9af5fdb121489/merged
tmpfs 794M 4.0K 794M 1% /run/user/0
root@srv525838:~#

These are the results of the past command.

Thanks!

Could you tell more about your deployment? How do you run Baserow?

If you’re running with compose, could you show the compose file? If it’s a plain docker, what’s the command?

Could you execute df -h in Baserow container (if you’re running multiple container setup, pick backend container)? docker exec $name_of_backend_container df -h

just a wild guess - (also not sure what the ‘file size variable’ refers to in the first post) isn’t 25 MB a default max file size for Nginx?

on my server I am using easypanel to administer it. my baserow database was installed by easypanel.

I couldn’t find the Nginx file. On my server I am using easypanel to administer it and my baserow database was installed on easypanel, where easypanel already has a pre-ready installation of baserow.

just a wild guess - (also not sure what the ‘file size variable’ refers to in the first post) isn’t 25 MB a default max file size for Nginx?

Default Baserow images use caddy, not nginx. Easypanel deployment seems to use default image + external postgresql/redis services.

Also, the error would look different in a scenario, where uploaded file is above allowed body size limit. Web servers usually return 419 Entity too large error. Here the error was returned from backend application, so web server passed it as a correct one.

Thank you for the information.

I’m sorry, but I’m not familiar with Easypanel, so I can only suspect what’s wrong. This deployment is provided by a 3rd party, so you should also contact your VPS support.

My suspicion here is that Baserow deployment prepared by Easypanel setups a separate /tmp partition with a limited disk space mounted in the container. This may be something configurable in the panel or may be a policy enforced by your administrator.

The error you’ve posted happens in a moment when a memory stream of an uploaded file is going to be written to a temporary file, before processing by the application. Temporary files are saved in system’s temp which is /tmp by default. Usually a temporary file is removed after the request has been processed, but there may be some cases when they are not removed and can pile up in a temp dir. This however may suggest some problems with the environment or the application.

You can try to restart Baserow’s container. A restart usually wipes /tmp directory. If the error will repeat, check logs of the container for errors during any previous upload. Also check container’s /tmp directory for any stale files.

As a workaround you can try to set own temp dir path by setting TMPDIR env variable for the container. You can set it to, for example, /baserow/data/tmp (/baserow/data/ is a persistent volume path used by the container, so once a directory is created there, it will survive container restarts).

Mind that this path should exist in the system before using it, and the temp directory should have wide access permissions (read/write/execute for user,group,other).

Cezary, do you do freelance work? Could I pay you to fix this error for me please.