Error: Failed to retrieve PID of executing child process

I get this error sometimes.

Error: Failed to retrieve PID of executing child process

Today I found that this can be caused by process limit exhaustion, here is where I found it:

https://youtu.be/qjWI7DTS7L8?t=614

And on the host the kernel.pid_max is already 4194304. Is there something that can be done here or is it a hard limit and nothing can be done?

By the way, no process limit is set on any of the containers.

Thanks.

In that case it seems likely something is deleting the lxc.conf file from /var/snap/lxd/common/lxd/logs/ see

https://github.com/canonical/lxd/issues/12084

After deleting some containers, some logs of containers still were present in “/var/snap/lxd/common/lxd/logs/”. Will they get cleaned up automatically? If so, what’s the cleanup interval?

We have seen that github issue, and as a simple workaround, we create a backup script that backs up the lxc.conf file and restores it when it’s missing.

However, when the containers were deleted, the dirs were still present in “/var/snap/lxd/common/lxd/logs/”. Not sure if we have to clean those using a script or if will they be automatically cleaned up.