TBR: playground: Increase time and memory limit.
Change-Id: I1e05b7ae33a24e6878a43aecb9b780a57a440448
diff --git a/go/src/v.io/x/playground/compilerd/compile.go b/go/src/v.io/x/playground/compilerd/compile.go
index 7860826..1e32448 100644
--- a/go/src/v.io/x/playground/compilerd/compile.go
+++ b/go/src/v.io/x/playground/compilerd/compile.go
@@ -40,12 +40,12 @@
// docker daemon. The GCE n1-standard machines have 3.75GB of RAM, so the
// default value below should leave plenty of room.
parallelism = flag.Int("parallelism", 5, "Maximum number of builds to run in parallel.")
- dockerMemLimit = flag.Int("total-docker-memory", 3000, "Total memory limit for all Docker build instances in MB.")
+ dockerMemLimit = flag.Int("total-docker-memory", 5000, "Total memory limit for all Docker build instances in MB.")
// Arbitrary deadline (enough to compile, run, shutdown).
// TODO(sadovsky): For now this is set high to avoid spurious timeouts.
// Playground execution speed needs to be optimized.
- maxTime = flag.Duration("max-time", 30*time.Second, "Maximum time for build to run.")
+ maxTime = flag.Duration("max-time", 60*time.Second, "Maximum time for build to run.")
// TODO(nlacasse): The default value of 100 was chosen arbitrarily and
// should be tuned.
diff --git a/go/src/v.io/x/playground/compilerd/main.go b/go/src/v.io/x/playground/compilerd/main.go
index 3aa3682..8043791 100644
--- a/go/src/v.io/x/playground/compilerd/main.go
+++ b/go/src/v.io/x/playground/compilerd/main.go
@@ -57,10 +57,6 @@
// written by compilerd to prevent reaching the hard limit.
maxSize = flag.Int("max-size", 1<<16, "Maximum request and output size.")
- // Maximum time to finish serving currently running requests before exiting
- // cleanly. No new requests are accepted during this time.
- exitDelay = 60 * time.Second
-
// Path to SQL configuration file, as described in v.io/x/lib/dbutil/mysql.go.
sqlConf = flag.String("sqlconf", "", "Path to SQL configuration file. If empty, load and save requests are disabled. "+dbutil.SqlConfigFileDescription)
)
@@ -151,6 +147,9 @@
// Or if the time limit expires.
deadline := time.After(limit)
log.Debug("Exiting at ", time.Now().Add(limit))
+
+ exitDelay := *maxTime + (10 * time.Second)
+
Loop:
for {
select {