Error: "System call error...Too many open files ...Can't open /ep01_splex/rp01_40/state/o.ep01-ma
说明
The following error appears in event_log:
"System call error: sp_ordr(utl) (for o.ep01 queue o.ep01) Too many open files Can't open /ep01_splex/rp01_40/state/o.ep01-marker for update Notice: sp_ordr (for o.ep01 queue o.ep01) Exiting due to failure updating marker file"
原因
The error is due to an 'fopen' limitation. Shareplex uses fopen to open OS files. The number of files that Shareplex will try to open is approximately 1/3 of the value of nofiles. On certain Unix platforms, like Solaris, fopen has a limit of 256 files.
解决办法
Reducing the nofiles value that Shareplex was using will prevent if from trying to open more files than fopen allows for.
Generally a ulimit of 600 for nofiles will solve the problem, but in certain instances, nofiles of 600 still returns the "too many open files" error. This may be due to another application on the server using either open() or fopen() calls as well. If any of the file descriptors under 256 have been allocated by open(), those file descriptors cannot be used by fopen(). That will reduce the nofiles shareplex can open using fopen(). You may need to lower the limit for nofiles even lower, such as to 400, which usually solves the problem.
Here are the steps to set ulimit in the session where you start Shareplex:
1. Shutdown Shareplex.
2. Set ulimit to 600 for the session (soft limit), use command for ksh: ulimit -n 600 for csh limit descriptor 600
3. ulimit -aS ---- should show that nofiles is now set to 600
4. Restart SharePlex and start all processes that have stopped due to this error.
The "uname -n 600" command should be added to the environment file (such as .profile), that is sourced by the user who starts Shareplex sp_cop.