Menu

#733 directory handles not closing correctly

6.9
open
nobody
Other (206)
5
2014-10-11
2009-02-20
No

We are processing between 45000 and 60000 logs every 6 hours, so to increase performance we are processing statistics via an ISAPI perl process, so the process itself never gets a chance to exit. Within a short amount of time we had 125000 orphaned directory handles open.

Looking at the awstats.pl script, there are two calls to opendir in awstats.pl, but they are attempted to be closed using "close" instead of "closedir". This results in the directory handle remaining open until the executing process exits, even though the script itself has exited.

Modifying the the script to use closedir on directory handles fixes the problem immediately.

Discussion


Log in to post a comment.