In a FreeBSD 13.2 system there's a mounted directory from a Windows server using smbfs, this directory has lots of files distributed in many subdirectories.
In this machine also there's a Jail with the smbfs directory mounted. Then from the jail a Python script opens every file from that directory, extracts some data and save that data to a db, then closes the file, this process is single threaded and should work in background for about one week.
The problem I found is after a while, let's say 10 minutes of running the system emits "Too many open files" error and no more files can be processed until the jail is restarted.
I've read that the files open could be clashing against kern.maxfiles, but its value is 20000 while kern.openfiles is never above ~600.
I'm lost, does anyone know where to look to start debugging this?
In this machine also there's a Jail with the smbfs directory mounted. Then from the jail a Python script opens every file from that directory, extracts some data and save that data to a db, then closes the file, this process is single threaded and should work in background for about one week.
The problem I found is after a while, let's say 10 minutes of running the system emits "Too many open files" error and no more files can be processed until the jail is restarted.
I've read that the files open could be clashing against kern.maxfiles, but its value is 20000 while kern.openfiles is never above ~600.
I'm lost, does anyone know where to look to start debugging this?