I've got an issue with my index files not being deleted. I have a cron job set up to kick off the index process every 5 minutes (test box, with little data). The process is as follows:
- Delete all index files via a delete command
- Loop through all the records in the database and index them
- Commits are triggered every 250 records
- An optimize is done at the end (twice because I read there was an issue with the optimize command)
What is happening is that the number of open files keeps growing every time the cron job runs, and the disk space is eventually used up by deleted files (something isn't closing the handle on the file, and thus the file is never really deleted)
My question is what exactly do I need to do to close these files? This is for an index only -- no searching is taking place. I'm also using the embedded version if that makes a difference...