From 4bff1dd5b642d103d21cc793ec068cb4cf9efbde Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 6 Dec 2020 23:15:01 +0200 Subject: [PATCH] Default limit for function conatiner is 1 cpu --- app/controllers/api/functions.php | 1 - app/workers/functions.php | 4 +--- tests/resources/functions/php-fx.gz | Bin 751 -> 0 bytes 3 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 tests/resources/functions/php-fx.gz diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 9eed692fc5..f1bb2cd6be 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -641,7 +641,6 @@ App::post('/v1/functions/:functionId/executions') throw new Exception('Failed saving execution to DB', 500); } - // Issue a TLS certificate when domain is verified Resque::enqueue('v1-functions', 'FunctionsV1', [ 'projectId' => $project->getId(), 'functionId' => $function->getId(), diff --git a/app/workers/functions.php b/app/workers/functions.php index 22bc197778..c09f85fd1f 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -378,7 +378,7 @@ class FunctionsV1 $exitCode = Console::execute("docker run \ -d \ --entrypoint=\"\" \ - --cpus=4 \ + --cpus=1 \ --memory=128m \ --memory-swap=128m \ --rm \ @@ -408,8 +408,6 @@ class FunctionsV1 ], ]; - var_dump($list); - Console::info("Function created in " . ($executionEnd - $executionStart) . " seconds with exit code {$exitCode}"); } else { diff --git a/tests/resources/functions/php-fx.gz b/tests/resources/functions/php-fx.gz deleted file mode 100644 index f8e3cbd811bcd4ba35044fdd5da81053afc36c40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 751 zcmV}bCj52Om!X(t3;+VSBt2L)0 zhvNCJ_RZ;7#G|9Sys@*B zf@-7F3Yky3{=e-slAhywm9>el0|)s(Gpqssw++S#oyiYp$^GA8v{>6MdRMs_6ZX0; zY)jLbCD&hJ*^$E@9Wrft@qb#;{~-V8f-x}|{|$p-{GSoZX5Hn4w8D9q1WGOrHw{DC zhuYsC^noAXH#;X*d!{v=#ri$jJRaf*=cw5=x{K zo20uT*l!@q)4qC>jD84EgFg$;^tGj+anNR<_#l8F2r_H>@_#y2tz0Ni^c)Ah{};OG z%m1<{xNrM%uw#IW=CFz5Jhci;uEo224~qE+g~VT&buz<+AT-zEiE$ ztDfsRHShd(8f-tyk|g9r&#vg?e0lI^A)0L&d`da+ym9l|mvfancUNBBd!v5Hyv(ZP z_4AW2-nqBmzE6E8Kk{E6{rintOortDOne;}H~**W|GHcOF#l&J{FeU{0a=s%GFIOnh)uiY9CHkaP@!i#pNaUGQ h$-4Do`O<~#)`Q2FH*h&X5CmBqegUKuI