Cause: the handle is used up.
This can be caused by the following situations:
1: The file handle is not closed, including common files, socket descriptors, and database connections.
2: although all handles are released, they are not manually released. As a result, they accumulate in garbage collection and an error occurs at a certain time.
3: Before fclose (FP), the operating system did not write the file content in the buffer to the disk, resulting in more files opened after multiple writes.
Solution:
1: Use ulimit to modify the value of the file opens option (only use the current session)
2: Echo "8192">/proc/sys/fs/FS-Max restart the computer (not necessarily effective)
3: The best way is to check the source code and modify the error.
In addition, if fclose (FP), FP does not point to any file, this will causeProgramCrash or memory error.