One of the things my Java application running on Linux is doing creating directories. All directories are created in /a/b/c, which at this point contains 31998 subdirs. 

Evidently this is enough to not allow any more to be created.

With this 2 questions:

* Why?
* How can i know what the max number is?