Only 0 MB of RAM available

I just upgraded Ubuntu from 24.04 to 26.04. I have nextcloud running on “bare metal” (no docker) here. I’m using Collabora Online - Built-in CODE Server 26.4.402 on nextcloud.

After the upgrade, I’m unable to open .odt .ods… files: the browser shows “Document loading failed. Starting the built-in CODE server is taking longer than expected”
On coolwsd.log I can find:

wsd-18467-18467 2026-09-30 14:57:01.539053 [ coolwsd ] INF Total available memory: 0 KB (0 GB), System memory: 0 KB (0 GB), cgroup limit: 0 KB, cgroup soft-limit: 0 KB, configured memproportion: 25%, actual percentage of system total
: 1e+02%, current usage: 66936 KB (1e+02% of limit)|home/collabora/jenkins/workspace/package_code_26.04_rpm/rpmbuild/BUILD/coolwsd-26.04.4.2/wsd/Admin.cpp:618
wsd-18467-18467 2026-09-30 14:57:01.539072 [ coolwsd ] ERR Low memory condition detected: only 0 MB of RAM available|home/collabora/jenkins/workspace/package_code_26.04_rpm/rpmbuild/BUILD/coolwsd-26.04.4.2/wsd/Admin.cpp:630

It seems that coolwsd only can see 0MB of RAM. My machine has 16GB of RAM, everything worked before upgrading to Ubuntu 26.04.

Any ideas?
Thank you

hi @giox069 welcome to collabora online forum :slight_smile:

The “0 MB of RAM” line is a clue about where coolwsd is running, not a real memory problem. coolwsd reads MemTotal: from /proc/meminfo, and 0 means it could not open the file at all.

Ubuntu 26.04 ships a much more locked-down apache2.service than 24.04. It now sets ProcSubset=pid (hides everything in /proc except per-process directories), plus RestrictNamespaces=yes, MemoryDenyWriteExecute=yes, PrivateDevices=yes and ProtectSystem=full. The built-in CODE AppImage is started by PHP from inside Apache, so it inherits that whole sandbox. The memory message is the visible symptom; the other restrictions are very likely what breaks document loading.

To confirm:

sudo nsenter -t "$(pgrep -o -x apache2)" -m -- ls /proc/meminfo

If that says “No such file or directory”, loosen the unit with a drop-in and restart Apache:

sudo systemctl edit apache2

[Service]
ProcSubset=all
ProtectProc=default
RestrictNamespaces=no
MemoryDenyWriteExecute=no
PrivateDevices=no

sudo systemctl restart apache2

The restart also clears Apache’s private /tmp, so the built-in server starts fresh. Once it works you can try re-enabling the settings one at a time to see which ones coolwsd really needs.

Longer term, running CODE as its own service (packages or Docker) avoids sharing the web server’s sandbox altogether.

If documents still fail afterwards, please post grep -E "ERR|WRN" coolwsd.log | head -50

I hope this will help with your setup

Thanks
Darshan

Hi, thank you for helping

root@s1:~# nsenter -t "$(pgrep -o -x apache2)" -m -- ls /proc/meminfo
/proc/meminfo

I also applied the modifications to /etc/systemd/system/apache2.service.d/override.conf via systemctl edit apache2, uninstalled and reinstalled CODE server from nextcloud web gui, but .odt documents are not loading. Here is the log. The memory error disappeared, but another error is here now:

root@s1:~# grep -E ' (ERR|WRN|FTL) ' $LOG | tail -30

wsd-226125-226125 2026-10-01 08:47:49.163758 [ coolwsd ] WRN No cache path is set in cache_files.path. Disabling cache|home/collabora/jenkins/workspace/package_code_26
.04_rpm/rpmbuild/BUILD/coolwsd-26.04.4.2/wsd/COOLWSD.cpp:2151
wsd-226125-226125 2026-10-01 08:47:50.967569 [ coolwsd ] ERR Could not open proof RSA key, Poco exception: I/O error: EVPPKey::loadKey('/etc/coolwsd/proof_key')
frk-226138-226138 2026-10-01 08:47:50.973243 [ coolforkit-ns ] ERR Security: Running without the ability to filter system calls is ill advised.|home/collabora/jenkins/
workspace/package_code_26.04_rpm/rpmbuild/BUILD/coolwsd-26.04.4.2/kit/ForKit.cpp:988

@giox069 Thanks. Good news first: the memory message is gone, so the Apache sandbox was behind that line. The remaining failure is something else.

The three lines you quoted are normal for the built-in server. The cache and proof-key messages appear on every built-in CODE install, and the seccomp warning is how the AppImage always runs. More telling is what is not there: no error at all when you try to open the document. That suggests the request never reaches coolwsd. Could you send:

  1. The exact message the browser shows now. Is it still “taking longer than expected”, or something else?
  2. Whether coolwsd is listening, and what the proxy reports:
    ss -ltnp | grep 9983
    curl -s https://YOUR-HOST/apps/richdocumentscode/proxy.php?status
  3. All log lines, not only ERR/WRN, from the moment you open a document:
    tail -60 $LOG
    plus any richdocuments entries in nextcloud.log from the same minute.

One more thing worth trying in parallel: richdocumentscode 26.4.402 came out on 24 Sep, right when you upgraded, and two people on 24.04 report that documents stopped opening with it while 26.4.303 works (#355 (Built-in CODE 26.4.402 fails to open documents with "System exception"; downgrade to 26.4.303 fixes it · Issue #355 · CollaboraOnline/richdocumentscode · GitHub), #356 (26.4.402: Built-in CODE fails to auto-start, proxy.php waits indefinitely for coolwsd.pid · Issue #356 · CollaboraOnline/richdocumentscode · GitHub)). You can install 26.4.303 by hand from the releases page (Release 26.4.303 · CollaboraOnline/richdocumentscode · GitHub): disable the app, replace the apps/richdocumentscode folder, enable it again. If that fixes it, we know the Ubuntu sandbox was only half of the story.

The browser was frozen on “loading”… but now… it works. And I don’t know why. The loadKey ERR and Security ERR are still in the logs, but it works. Documents are loaded.
I don’t really know what unblocked it. Maybe something in the browser cache ? I’m testing now from another PC, not the one I tested last time. I also removed some old Ubuntu 24.04 packages with “apt autoremove” and then rebooted.

I can also confirm that the apache2 unit override cofiguration

[Service]
ProcSubset=all
ProtectProc=default
RestrictNamespaces=no
MemoryDenyWriteExecute=no
PrivateDevices=no

is necessary for Ubuntu 26.04. Removing the override makes the “ERR Low memory condition detected: only 0 MB of RAM available” reappear.

It seems that the above apache2 unit override also fixed another nextcloud error:

[Tue Sep 29 20:21:48.453942 2026] [php:warn] [pid 297153:tid 297153] [client 192.168.56.85:43618] PHP Warning: preg_match(): Allocat
ion of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to a
llocate executable memory, or set pcre.jit=0 in /mnt/d1/shared/www/nextcloud/lib/base.php on line 1277

I’m now using this minimized override (edit withsystemctl edit apache2):

[Service]
ProcSubset=all
RestrictNamespaces=no
MemoryDenyWriteExecute=no

MemoryDenyWriteExecute=no makes libreoffice documents load correctly, despite the “0 MB of RAM available” error is still in the logs

RestrictNamespaces=no makes nextcloud PHP warning “preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled.” to disappear.

ProcSubset=all makes “[ coolwsd ] ERR Low memory condition detected: only 0 MB of RAM available” disappear