DB2 The maximum number of open files has been reached

After a fresh install of DB2 Express C (free download from IBM) 9.5.2 on Linux AMD 64bit, I got the following error trying to load some tables for testing:

SQL3500W  The utility is beginning the "LOAD" phase at time "01/22/2009
07:40:27.557594".

SQL0958C  The maximum number of open files has been reached.  SQLSTATE=57009

After some investigation, I found that the following 3 places impact the open files:

  • /etc/security/limits.conf
  • /proc/sys/fs/file-max & /etc/sysctl.conf & sysctl -w fs.file-max=xxxx
  • DB2 Config parameter MAXFILOP (max on Linux 64 is 61440)

Once all these are correclty set, things should run smoothly.  Remember to restart the instance. 

In addition, if you are using NFS, either for the core database or for the files involving LOAD, EXPORT, BACKUP, RESTORE, make sure that nfslock is running:

chkconfig nfslock on
service nfslock start
This entry was posted in DB2 and tagged , . Bookmark the permalink.

NewPush has solutions to fit your business needs.  For more than a decade, our focus has been to take on the technical challenges that are the hardest and most time-consumming.  Our goal is to free up your resources to focus on the core activities of your business and to drive your business performance.  Please visit our main site at newpush.com for more information or call us at +1-303-423-4500.