From d16e8f62db08411d7e1ec96abb6dbba7f8e91262 Mon Sep 17 00:00:00 2001 From: Thaddee Tyl Date: Sat, 21 Nov 2015 12:33:22 +0100 Subject: [PATCH] Re-enable server cache The hope is that having only one server (HTTP, instead of HTTP + HTTPS) would be enough to relieve the server of the stress it experiences memory-wise. While there was a crash a week with two servers, there was only one crash in a month since the switch, and the server was immediately restarted. --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 6f3594f..74a440f 100644 --- a/server.js +++ b/server.js @@ -158,8 +158,8 @@ var minAccuracy = 0.75; // = 1 - max(1, df) / rf var freqRatioMax = 1 - minAccuracy; -// Request cache size of 50MB (~5000 bytes/image). -var requestCache = new LruCache(0); // 10000 +// Request cache size of 5MB (~5000 bytes/image). +var requestCache = new LruCache(1000); // Deep error handling for vendor hooks. var vendorDomain = domain.create();