linux – Can’t write to /tmp in systemd service with PrivateTmp=true

My apache2 service has PrivateTmp=true. When the service first starts it works fine, but after a few days, writing to /tmp fails with “no such file or directory”. To debug I’ve tried running nsenter -t <apache-pid> -m bash and I’ve confirmed that /tmp exists, but mkdir /tmp/test fails with “no such file or directory”. I’d rather not remove the PrivateTmp=true directive.

If I restart the service it starts working again.

The mount line for /tmp inside says it is mounted to /dev/nvme0n1 which seems odd to me, but that is the case both when /tmp is working immediately after starting the service and when it is not writable.

Anyone know why /tmp suddenly becomes unwritable?