[Geoserver-users] can't create data store which a large number of files

I have in the data_dir/maps/ folder something lie 5k files.

The GUI to create a datastore, browse, when selecting the folder first
spins, then stops with no change. Second click on the directory
redirects me to an internal server error which basically says
InvalidUrlException.

fileTable:fileContent:files:1:nameLink not found on page

Not sure what to do