According to this blog entry, the author estimates that the maximum normal ext4 directory size is about 10 million files unless the large_dir filesystem option is enabled:
Suppose, not entirely hypothetically, that one day you discover your (Linux) kernel logging messages like this:
EXT4-fs warning (device md1): ext4_dx_add_entry:2461: Directory (ino: 102236164) index full, reach max htree level :2 EXT4-fs warning (device md1): ext4_dx_add_entry:2465: Large directory feature is not enabled on this filesystem
Congratulations, of a sort. You've managed to accumulate so many files in the directory that it has filled up, in a logical sense. Unfortunately, further attempts to create files will fail; in fact they are already failing, because that's how you get the error message. If you're lucky, your software is logging error messages and you're noticing them. Also, since your directory got so large, you may have an unpleasant surprise coming your way.
('Large' here is relative. The directory that this happened to was only about 575 MBytes as reported by 'ls -lh'; this is very large for a directory, but not that large for a modern file. The filesystem as a whole had tons of space free.)
I would suggest looking through the kernel logs using dmesg and seeing if you're getting messages like this and then consider if you need to enable it using tune2fs with the -O large_dir option.