I figured out a workaround with this bug. I changed the file /pentaho-server/pentaho-solutions/system/pentaho-cdf-dd/ehcache.xml on the pentaho-cde cache by adding the maxElementsInMemory to 5000 and switched the eternal flag to true.
It does help but I'm concerned if this change will cause other unknown issues. Should I be worried?