Too many open files error when upgrading to 3.10.3

Hi all,
We recently upgraded from Liquibase 3.3.1 to 3.10.3. Our application applies Liquibase changes at app startup using SpringLiquibase. After upgrading, our application failed to start with a “Too many open files” error. After a little bit of investigating, it appears that the DefaultPackageScanClassResolver is identifying quite a bit more class files which may be contributing to this error. If you compare classFilesByLocation, you can see the difference:
classFilesByLocation = {HashMap@23431} size = 1
“/Users/…/WEB-INF/lib/liquibase-core-3.3.1.jar” → {HashSet@23712} size = 952

classFilesByLocation = {HashMap@22783} size = 2
null → {HashSet@22825} size = 1923
“/Users/…/WEB-INF/lib/liquibase-core-3.10.3.jar” → {HashSet@22814} size = 1923

Not only is there more than double the number of classes, but the 2 entries appear to have the same classes.

We were able to work around this by increasing the ulimit on our app server from 4096 to 8192. Once the application finishes starting, the number of open files drops considerably. I noticed that there is currently a logged issue for something similar but I believe it’s only relevant to the 4+ version. I was wondering if anyone else has experienced this issue.

Hi @kraymondksc ,

I made a comment on the github issue you referenced, please add yourself as a watcher and let’s carry on the thread there.