Too many open files
The EMFILE error (“too many open files”) means PhotoStructure has hit your system’s limit on simultaneously open files.
Quick fix
Increase the file descriptor limit for your session:
ulimit -n 65536
Then restart PhotoStructure.
Permanent fix (Linux)
Add to /etc/security/limits.conf:
* soft nofile 65536
* hard nofile 65536
Then log out and back in.
Permanent fix (macOS)
Create /Library/LaunchDaemons/limit.maxfiles.plist with appropriate values, or use launchctl limit maxfiles.
Alternative: reduce parallelism
If you can’t increase the limit, reduce PhotoStructure’s parallelism:
export PS_MAX_SYNC_WORKERS=2
This processes fewer files simultaneously, using fewer file descriptors.
