limit queue sizes

This commit is contained in:
Athou
2013-07-28 16:36:21 +02:00
parent 8ed58a8aa5
commit 7827cf49d6
2 changed files with 2 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ public class FeedRefreshUpdater {
public void init() {
ApplicationSettings settings = applicationSettingsService.get();
int threads = Math.max(settings.getDatabaseUpdateThreads(), 1);
pool = new FeedRefreshExecutor("feed-refresh-updater", threads, 500 * threads);
pool = new FeedRefreshExecutor("feed-refresh-updater", threads, Math.min(50 * threads, 1000));
locks = Striped.lazyWeakLock(threads * 100000);
}

View File

@@ -55,7 +55,7 @@ public class FeedRefreshWorker {
private void init() {
ApplicationSettings settings = applicationSettingsService.get();
int threads = settings.getBackgroundThreads();
pool = new FeedRefreshExecutor("feed-refresh-worker", threads, 20 * threads);
pool = new FeedRefreshExecutor("feed-refresh-worker", threads, Math.min(20 * threads, 1000));
}
@PreDestroy