Warning: session_start(): open(/var/lib/php/sessions/sess_e74k2ah19c8s11ni88e1e254ci, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51

Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
scope simpleSpamClientDetect2. static int simpleSpamClientDetect2_interval = 60000; static double #perSecondThreshold = 2.0; // per IP + URI static int #spamMax; static Set #whiteList = syncSet(myIPs()); // ip + uri -> time, count static Map, Pair> #ipsAndUris = synchroMap(); // returns pair(count, bad) static Pair simpleSpamClientDetect2(S clientIP, S uri) { // TODO: clean up map sometimes Pair pair = pair(clientIP, uri); Pair value = ipsAndUris.get(pair); if (value == null || now() > value.a+interval) ipsAndUris.put(pair, value = pair(now(), 1)); else value.b++; spamMax = iround(perSecondThreshold*interval/1000); ret pair(value.b, !contains(whiteList, clientIP) && value.b >= spamMax); } end scope