Legacy Knowledge Base
Published Jul. 2, 2025

Document library folder creation limit of 65533 or 32767 (AIX) exceeded

Written By

Sorin Pop

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • Creation of new folder fails with IOException
  • I have hit the underlying operating system's limit for the number of files/subfolders per folder. With FileSystemStore or AdvancedFileSysteStore you can run into this problem. 

Environment

  • Portal 6.2
  • DXP 7.0
  • DXP 7.1

Resolution

  • Reduce the number of Documents and Media folders in your system
  • Migrate to DBStore
  •  Use an underlying file system that supports more than this limit, or configure the current one to support more (if possible)

As per the wikipedia entry for Ext4:

Unlimited number of subdirectoriesExt4 allows an unlimited number of subdirectories.

(In ext3 a directory can have at most 32,000 subdirectories.)[[15]|https://en.wikipedia.org/wiki/Ext4#cite_note-15] To allow for larger directories and continued performance, ext4 turns on HTree indices (a specialized version of a B-tree) by default. This feature is implemented in Linux 2.6.23. In ext3 HTrees can be used by enabling the dir_index feature.

 

As per Ext4 configurations:

dir_index
Use hashed b-trees to speed up name lookups in large directories. This feature is supported by ext3 and ext4 file systems, and is ignored by ext2 file systems.
dir_nlink
Normally, ext4 allows an inode to have no more than 65,000 hard links. This applies to regular files as well as directories, which means that there can be no more than 64,998 subdirectories in a directory (because each of the '.' and '..' entries, as well as the directory entry for the directory in its parent directory counts as a hard link). This feature lifts this limit by causing ext4 to use a link count of 1 to indicate that the number of hard links to a directory is not known when the link count might exceed the maximum count

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base