From 372c2f7170e0ba1fdeb35c019b86d425fe1629b7 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 16 Apr 2015 14:57:11 +0100 Subject: [PATCH 1/1] Correct idle time test --- cookbooks/tile/templates/default/export.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/tile/templates/default/export.erb b/cookbooks/tile/templates/default/export.erb index 921361563..97aa161f6 100644 --- a/cookbooks/tile/templates/default/export.erb +++ b/cookbooks/tile/templates/default/export.erb @@ -61,7 +61,7 @@ cputimes = [float(n) for n in open("/proc/stat").readline().rstrip().split()[1:- idletime = cputimes[3] / sum(cputimes) # Process the request -if idletime < 20: +if idletime < 0.2: # Abort if the CPU idle time on the machine is too low print "Status: 503 Service Unavailable" output_error("The server is too busy at the moment. Please wait a few minutes before trying again.") -- 2.43.2