Filebeat with Large Registry/State File Causes `runtime: program exceeds 10000-thread limit` on Startup

I managed to get it stabilized, by increasing CPU from 2 to 4 and RAM from 4GB to 8GB, but I still think there is an issue here, as this amount of resource seems pretty excessive to get Filebeat to startup.