(crawl) Make crawler limiter request a GC when throttling

This commit is contained in:
Viktor Lofgren 2023-08-03 17:58:18 +02:00
parent 63e857f7cd
commit c22feaf42e

View File

@ -51,6 +51,9 @@ public class CrawlLimiter {
else if (!oldThrottle && freeMemory < THROTTLE_TRIGGER_FREE_RAM) { else if (!oldThrottle && freeMemory < THROTTLE_TRIGGER_FREE_RAM) {
newThrottle = true; newThrottle = true;
logger.warn("Memory based throttling triggered"); logger.warn("Memory based throttling triggered");
// Try to GC
System.gc();
} }