External storage usage produces php error

I for the last week I have seen that a complete scans of my files in my external mounts (via sftp) sometimes lead to directories being empty. When checking the logs, I see this exact error a few times. I don’t know if it’s related.

Anyone has an idea what could be happening?