Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Playwright] Lambda /tmp fills up quickly #231

Open
sg650 opened this issue Feb 17, 2024 · 6 comments
Open

[BUG] [Playwright] Lambda /tmp fills up quickly #231

sg650 opened this issue Feb 17, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@sg650
Copy link

sg650 commented Feb 17, 2024

Environment

  • @sparticuz/chromium Version: ^121.0.0
  • playwright / playwright-core Version: 1.41.2
  • Node.js Version: 20
  • Lambda / GCF Runtime: nodejs20.x

Expected Behavior

Should be able to request a await page.goto(c.req.query('url')); indefinitely.

Current Behavior

With 1GB ephemeral storage allocated to the Lambda, the /tmp spaces fills up after about 30-40 invocations and every subsequent request fails with:
ERROR Unexpected Error: page.goto: net::ERR_INSUFFICIENT_RESOURCES at https://www.google.com/

Steps to Reproduce

Create a basic lambda that runs the following code...

const { Hono } = require('hono');
const playwright = require('playwright-core');
const { stream } = require('hono/streaming');
const fs = require('fs');
const { exec } = require('child_process');
const util = require('util');
const execProm = util.promisify(exec);

function routes({ args, executablePath, headless }) {
  const app = new Hono();

  app.get('/', async (c) => {
    let browser;
    try {
      browser = await playwright.chromium.launch({
        args,
        executablePath: await executablePath,
        headless,
      });
      const page = await browser.newPage();

      console.log('Navigating to:', c.req.query('url'));
      const response = await page.goto(c.req.query('url'));
      const title = await page.title();
      console.log('Response status:', response?.status(), title);
    } catch (error) {
      console.error('Unexpected Error:', error);
      const message = error.message || 'Unexpected Error';
      return c.text(message, 500);
    } finally {
      console.log('Closing the browser...');
      await browser?.close();
    }
    c.res.headers.set('content-type', 'text/plain');
    return stream(c, async (stream) => {
      stream.onAbort(() => {
        console.log('Stream aborted!');
      });

      await stream.write(`Hello from Lambda Service! ${await getTmpDfOutput()}`);
      console.log(await getTmpDfOutput());
    });
  });

  return { app };
}

async function getTmpDfOutput() {
  // log out the output of df -h /tmp
  const { stdout } = await execProm('df -h /tmp 2>&1');
  return `df -h /tmp:\n\n${stdout}`;
}

module.exports = routes;

LOGS

INIT_START Runtime Version: nodejs:20.v15 Runtime Version ARN: xxxxxxxx
START RequestId: 9465ec3b-4c58-4f71-8d6e-76fc3784240d Version: $LATEST
2024-02-17T23:48:21.236Z  9465ec3b-4c58-4f71-8d6e-76fc3784240d    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:21.963Z  9465ec3b-4c58-4f71-8d6e-76fc3784240d    INFO    Response status: 200 Google
2024-02-17T23:48:21.964Z  9465ec3b-4c58-4f71-8d6e-76fc3784240d    INFO    Closing the browser...
2024-02-17T23:48:22.338Z  9465ec3b-4c58-4f71-8d6e-76fc3784240d    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  310M  715M  31% /tmp
END RequestId: 9465ec3b-4c58-4f71-8d6e-76fc3784240d
REPORT RequestId: 9465ec3b-4c58-4f71-8d6e-76fc3784240d    Duration: 2515.31 ms    Billed Duration: 2516 ms        Memory Size: 8192 MB    Max Memory Used: 675 MB        Init Duration: 505.31 ms
START RequestId: 22500773-957f-4247-96c1-508936bcc173 Version: $LATEST
2024-02-17T23:48:22.552Z  22500773-957f-4247-96c1-508936bcc173    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:23.274Z  22500773-957f-4247-96c1-508936bcc173    INFO    Response status: 200 Google
2024-02-17T23:48:23.275Z  22500773-957f-4247-96c1-508936bcc173    INFO    Closing the browser...
2024-02-17T23:48:23.435Z  22500773-957f-4247-96c1-508936bcc173    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  310M  715M  31% /tmp
END RequestId: 22500773-957f-4247-96c1-508936bcc173
REPORT RequestId: 22500773-957f-4247-96c1-508936bcc173    Duration: 951.38 ms     Billed Duration: 952 ms Memory Size: 8192 MB    Max Memory Used: 683 MB
START RequestId: 90cc4876-cadc-4427-949d-b26957f18b7c Version: $LATEST
2024-02-17T23:48:23.614Z  90cc4876-cadc-4427-949d-b26957f18b7c    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:24.279Z  90cc4876-cadc-4427-949d-b26957f18b7c    INFO    Response status: 200 Google
2024-02-17T23:48:24.279Z  90cc4876-cadc-4427-949d-b26957f18b7c    INFO    Closing the browser...
2024-02-17T23:48:24.448Z  90cc4876-cadc-4427-949d-b26957f18b7c    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  310M  715M  31% /tmp
END RequestId: 90cc4876-cadc-4427-949d-b26957f18b7c
REPORT RequestId: 90cc4876-cadc-4427-949d-b26957f18b7c    Duration: 895.51 ms     Billed Duration: 896 ms Memory Size: 8192 MB    Max Memory Used: 686 MB
START RequestId: 747ed449-68c6-4752-afc5-099b0663c8cd Version: $LATEST
2024-02-17T23:48:24.629Z  747ed449-68c6-4752-afc5-099b0663c8cd    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:25.305Z  747ed449-68c6-4752-afc5-099b0663c8cd    INFO    Response status: 200 Google
2024-02-17T23:48:25.306Z  747ed449-68c6-4752-afc5-099b0663c8cd    INFO    Closing the browser...
2024-02-17T23:48:25.614Z  747ed449-68c6-4752-afc5-099b0663c8cd    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  436M  590M  43% /tmp
END RequestId: 747ed449-68c6-4752-afc5-099b0663c8cd
REPORT RequestId: 747ed449-68c6-4752-afc5-099b0663c8cd    Duration: 1047.99 ms    Billed Duration: 1048 ms        Memory Size: 8192 MB    Max Memory Used: 807 MB
START RequestId: 95e26a17-6a5a-414e-8777-7a234ff3d7df Version: $LATEST
2024-02-17T23:48:25.799Z  95e26a17-6a5a-414e-8777-7a234ff3d7df    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:26.760Z  95e26a17-6a5a-414e-8777-7a234ff3d7df    INFO    Response status: 200 Google
2024-02-17T23:48:26.761Z  95e26a17-6a5a-414e-8777-7a234ff3d7df    INFO    Closing the browser...
2024-02-17T23:48:27.075Z  95e26a17-6a5a-414e-8777-7a234ff3d7df    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  561M  465M  55% /tmp
END RequestId: 95e26a17-6a5a-414e-8777-7a234ff3d7df
REPORT RequestId: 95e26a17-6a5a-414e-8777-7a234ff3d7df    Duration: 1333.33 ms    Billed Duration: 1334 ms        Memory Size: 8192 MB    Max Memory Used: 938 MB
START RequestId: 8466ab22-517b-474e-9b70-364eb005696c Version: $LATEST
2024-02-17T23:48:27.259Z  8466ab22-517b-474e-9b70-364eb005696c    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:27.916Z  8466ab22-517b-474e-9b70-364eb005696c    INFO    Response status: 200 Google
2024-02-17T23:48:27.917Z  8466ab22-517b-474e-9b70-364eb005696c    INFO    Closing the browser...
2024-02-17T23:48:28.110Z  8466ab22-517b-474e-9b70-364eb005696c    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  561M  465M  55% /tmp
END RequestId: 8466ab22-517b-474e-9b70-364eb005696c
REPORT RequestId: 8466ab22-517b-474e-9b70-364eb005696c    Duration: 918.28 ms     Billed Duration: 919 ms Memory Size: 8192 MB    Max Memory Used: 948 MB
START RequestId: 431440fa-f411-4965-9d53-16a293bc635e Version: $LATEST
2024-02-17T23:48:28.299Z  431440fa-f411-4965-9d53-16a293bc635e    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:28.944Z  431440fa-f411-4965-9d53-16a293bc635e    INFO    Response status: 200 Google
2024-02-17T23:48:28.944Z  431440fa-f411-4965-9d53-16a293bc635e    INFO    Closing the browser...
2024-02-17T23:48:29.162Z  431440fa-f411-4965-9d53-16a293bc635e    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  561M  465M  55% /tmp
END RequestId: 431440fa-f411-4965-9d53-16a293bc635e
REPORT RequestId: 431440fa-f411-4965-9d53-16a293bc635e    Duration: 918.93 ms     Billed Duration: 919 ms Memory Size: 8192 MB    Max Memory Used: 950 MB
START RequestId: b5c548e5-903f-435f-9d0b-cc3b05b148d6 Version: $LATEST
2024-02-17T23:48:29.334Z  b5c548e5-903f-435f-9d0b-cc3b05b148d6    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:30.002Z  b5c548e5-903f-435f-9d0b-cc3b05b148d6    INFO    Response status: 200 Google
2024-02-17T23:48:30.002Z  b5c548e5-903f-435f-9d0b-cc3b05b148d6    INFO    Closing the browser...
2024-02-17T23:48:30.147Z  b5c548e5-903f-435f-9d0b-cc3b05b148d6    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  561M  465M  55% /tmp
END RequestId: b5c548e5-903f-435f-9d0b-cc3b05b148d6
REPORT RequestId: b5c548e5-903f-435f-9d0b-cc3b05b148d6    Duration: 872.00 ms     Billed Duration: 873 ms Memory Size: 8192 MB    Max Memory Used: 950 MB
START RequestId: 47bb2514-5412-48d2-8a15-e7fee7c78a61 Version: $LATEST
2024-02-17T23:48:30.368Z  47bb2514-5412-48d2-8a15-e7fee7c78a61    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:31.026Z  47bb2514-5412-48d2-8a15-e7fee7c78a61    INFO    Response status: 200 Google
2024-02-17T23:48:31.026Z  47bb2514-5412-48d2-8a15-e7fee7c78a61    INFO    Closing the browser...
2024-02-17T23:48:31.569Z  47bb2514-5412-48d2-8a15-e7fee7c78a61    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  689M  336M  68% /tmp
END RequestId: 47bb2514-5412-48d2-8a15-e7fee7c78a61
REPORT RequestId: 47bb2514-5412-48d2-8a15-e7fee7c78a61    Duration: 1304.02 ms    Billed Duration: 1305 ms        Memory Size: 8192 MB    Max Memory Used: 1076 MB
START RequestId: 411b9ce6-ca95-4666-8159-c7bb39812efa Version: $LATEST
2024-02-17T23:48:31.760Z  411b9ce6-ca95-4666-8159-c7bb39812efa    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:32.433Z  411b9ce6-ca95-4666-8159-c7bb39812efa    INFO    Response status: 200 Google
2024-02-17T23:48:32.433Z  411b9ce6-ca95-4666-8159-c7bb39812efa    INFO    Closing the browser...
2024-02-17T23:48:32.602Z  411b9ce6-ca95-4666-8159-c7bb39812efa    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  689M  336M  68% /tmp
END RequestId: 411b9ce6-ca95-4666-8159-c7bb39812efa
REPORT RequestId: 411b9ce6-ca95-4666-8159-c7bb39812efa    Duration: 916.92 ms     Billed Duration: 917 ms Memory Size: 8192 MB    Max Memory Used: 1083 MB
START RequestId: 80044812-03db-443f-8f8b-80716bb4686f Version: $LATEST
2024-02-17T23:48:32.771Z  80044812-03db-443f-8f8b-80716bb4686f    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:33.464Z  80044812-03db-443f-8f8b-80716bb4686f    INFO    Response status: 200 Google
2024-02-17T23:48:33.464Z  80044812-03db-443f-8f8b-80716bb4686f    INFO    Closing the browser...
2024-02-17T23:48:33.832Z  80044812-03db-443f-8f8b-80716bb4686f    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  818M  207M  80% /tmp
END RequestId: 80044812-03db-443f-8f8b-80716bb4686f
REPORT RequestId: 80044812-03db-443f-8f8b-80716bb4686f    Duration: 1115.46 ms    Billed Duration: 1116 ms        Memory Size: 8192 MB    Max Memory Used: 1210 MB
START RequestId: 4fe9f769-ecca-427b-be85-618237b78c72 Version: $LATEST
2024-02-17T23:48:34.007Z  4fe9f769-ecca-427b-be85-618237b78c72    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:34.693Z  4fe9f769-ecca-427b-be85-618237b78c72    INFO    Response status: 200 Google
2024-02-17T23:48:34.693Z  4fe9f769-ecca-427b-be85-618237b78c72    INFO    Closing the browser...
2024-02-17T23:48:34.866Z  4fe9f769-ecca-427b-be85-618237b78c72    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  818M  207M  80% /tmp
END RequestId: 4fe9f769-ecca-427b-be85-618237b78c72
REPORT RequestId: 4fe9f769-ecca-427b-be85-618237b78c72    Duration: 919.01 ms     Billed Duration: 920 ms Memory Size: 8192 MB    Max Memory Used: 1217 MB
START RequestId: 35c8cbc9-1ffc-4fa9-988a-f83c8f05080d Version: $LATEST
2024-02-17T23:48:35.040Z  35c8cbc9-1ffc-4fa9-988a-f83c8f05080d    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:35.731Z  35c8cbc9-1ffc-4fa9-988a-f83c8f05080d    INFO    Response status: 200 Google
2024-02-17T23:48:35.732Z  35c8cbc9-1ffc-4fa9-988a-f83c8f05080d    INFO    Closing the browser...
2024-02-17T23:48:35.891Z  35c8cbc9-1ffc-4fa9-988a-f83c8f05080d    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  818M  207M  80% /tmp
END RequestId: 35c8cbc9-1ffc-4fa9-988a-f83c8f05080d
REPORT RequestId: 35c8cbc9-1ffc-4fa9-988a-f83c8f05080d    Duration: 909.90 ms     Billed Duration: 910 ms Memory Size: 8192 MB    Max Memory Used: 1217 MB
START RequestId: 7631534f-2cd7-4d4e-8c02-d4fb35f3c362 Version: $LATEST
2024-02-17T23:48:36.073Z  7631534f-2cd7-4d4e-8c02-d4fb35f3c362    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:36.770Z  7631534f-2cd7-4d4e-8c02-d4fb35f3c362    INFO    Response status: 200 Google
2024-02-17T23:48:36.770Z  7631534f-2cd7-4d4e-8c02-d4fb35f3c362    INFO    Closing the browser...
2024-02-17T23:48:37.200Z  7631534f-2cd7-4d4e-8c02-d4fb35f3c362    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  947M   79M  93% /tmp
END RequestId: 7631534f-2cd7-4d4e-8c02-d4fb35f3c362
REPORT RequestId: 7631534f-2cd7-4d4e-8c02-d4fb35f3c362    Duration: 1196.90 ms    Billed Duration: 1197 ms        Memory Size: 8192 MB    Max Memory Used: 1342 MB
START RequestId: 8001a0e8-735c-468f-876f-670890cc1f38 Version: $LATEST
2024-02-17T23:48:37.385Z  8001a0e8-735c-468f-876f-670890cc1f38    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:38.039Z  8001a0e8-735c-468f-876f-670890cc1f38    INFO    Response status: 200 Google
2024-02-17T23:48:38.039Z  8001a0e8-735c-468f-876f-670890cc1f38    INFO    Closing the browser...
2024-02-17T23:48:38.371Z  8001a0e8-735c-468f-876f-670890cc1f38    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  996M   29M  98% /tmp
END RequestId: 8001a0e8-735c-468f-876f-670890cc1f38
REPORT RequestId: 8001a0e8-735c-468f-876f-670890cc1f38    Duration: 1056.76 ms    Billed Duration: 1057 ms        Memory Size: 8192 MB    Max Memory Used: 1394 MB
START RequestId: 58ab6592-3f99-45a5-ae21-1ab18d5dd2be Version: $LATEST
2024-02-17T23:48:38.541Z  58ab6592-3f99-45a5-ae21-1ab18d5dd2be    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:39.192Z  58ab6592-3f99-45a5-ae21-1ab18d5dd2be    INFO    Response status: 200 Google
2024-02-17T23:48:39.192Z  58ab6592-3f99-45a5-ae21-1ab18d5dd2be    INFO    Closing the browser...
2024-02-17T23:48:39.243Z  58ab6592-3f99-45a5-ae21-1ab18d5dd2be    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  996M   29M  98% /tmp
END RequestId: 58ab6592-3f99-45a5-ae21-1ab18d5dd2be
REPORT RequestId: 58ab6592-3f99-45a5-ae21-1ab18d5dd2be    Duration: 758.63 ms     Billed Duration: 759 ms Memory Size: 8192 MB    Max Memory Used: 1398 MB
START RequestId: f129a3c4-f7d8-457b-8acd-c85e96790f6b Version: $LATEST
2024-02-17T23:48:39.411Z  f129a3c4-f7d8-457b-8acd-c85e96790f6b    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:40.106Z  f129a3c4-f7d8-457b-8acd-c85e96790f6b    INFO    Response status: 200 Google
2024-02-17T23:48:40.106Z  f129a3c4-f7d8-457b-8acd-c85e96790f6b    INFO    Closing the browser...
2024-02-17T23:48:40.167Z  f129a3c4-f7d8-457b-8acd-c85e96790f6b    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G  998M   27M  98% /tmp
END RequestId: f129a3c4-f7d8-457b-8acd-c85e96790f6b
REPORT RequestId: f129a3c4-f7d8-457b-8acd-c85e96790f6b    Duration: 812.32 ms     Billed Duration: 813 ms Memory Size: 8192 MB    Max Memory Used: 1398 MB
START RequestId: fbb36ab1-e362-4827-8fd1-9d1d89811d92 Version: $LATEST
2024-02-17T23:48:40.344Z  fbb36ab1-e362-4827-8fd1-9d1d89811d92    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:41.023Z  fbb36ab1-e362-4827-8fd1-9d1d89811d92    INFO    Response status: 200 Google
2024-02-17T23:48:41.024Z  fbb36ab1-e362-4827-8fd1-9d1d89811d92    INFO    Closing the browser...
2024-02-17T23:48:41.072Z  fbb36ab1-e362-4827-8fd1-9d1d89811d92    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1000M   25M  98% /tmp
END RequestId: fbb36ab1-e362-4827-8fd1-9d1d89811d92
REPORT RequestId: fbb36ab1-e362-4827-8fd1-9d1d89811d92    Duration: 790.47 ms     Billed Duration: 791 ms Memory Size: 8192 MB    Max Memory Used: 1398 MB
START RequestId: 178f7cf2-4987-4a75-aa77-2f4c9b8040a2 Version: $LATEST
2024-02-17T23:48:41.252Z  178f7cf2-4987-4a75-aa77-2f4c9b8040a2    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:41.835Z  178f7cf2-4987-4a75-aa77-2f4c9b8040a2    INFO    Response status: 200 Google
2024-02-17T23:48:41.835Z  178f7cf2-4987-4a75-aa77-2f4c9b8040a2    INFO    Closing the browser...
2024-02-17T23:48:41.870Z  178f7cf2-4987-4a75-aa77-2f4c9b8040a2    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1000M   25M  98% /tmp
END RequestId: 178f7cf2-4987-4a75-aa77-2f4c9b8040a2
REPORT RequestId: 178f7cf2-4987-4a75-aa77-2f4c9b8040a2    Duration: 683.64 ms     Billed Duration: 684 ms Memory Size: 8192 MB    Max Memory Used: 1398 MB
START RequestId: 46dbb121-58ab-44c6-8cc9-f7848f056dfa Version: $LATEST
2024-02-17T23:48:42.053Z  46dbb121-58ab-44c6-8cc9-f7848f056dfa    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:42.628Z  46dbb121-58ab-44c6-8cc9-f7848f056dfa    INFO    Response status: 200 Google
2024-02-17T23:48:42.629Z  46dbb121-58ab-44c6-8cc9-f7848f056dfa    INFO    Closing the browser...
2024-02-17T23:48:42.870Z  46dbb121-58ab-44c6-8cc9-f7848f056dfa    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1000M   25M  98% /tmp
END RequestId: 46dbb121-58ab-44c6-8cc9-f7848f056dfa
REPORT RequestId: 46dbb121-58ab-44c6-8cc9-f7848f056dfa    Duration: 885.21 ms     Billed Duration: 886 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 3f360bd6-c211-4f4d-81a5-cac136aa4857 Version: $LATEST
2024-02-17T23:48:43.038Z  3f360bd6-c211-4f4d-81a5-cac136aa4857    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:43.875Z  3f360bd6-c211-4f4d-81a5-cac136aa4857    INFO    Response status: 200 Google
2024-02-17T23:48:43.876Z  3f360bd6-c211-4f4d-81a5-cac136aa4857    INFO    Closing the browser...
2024-02-17T23:48:43.990Z  3f360bd6-c211-4f4d-81a5-cac136aa4857    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1000M   25M  98% /tmp
END RequestId: 3f360bd6-c211-4f4d-81a5-cac136aa4857
REPORT RequestId: 3f360bd6-c211-4f4d-81a5-cac136aa4857    Duration: 1010.47 ms    Billed Duration: 1011 ms        Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: ac0356fb-9bc5-4ca8-9908-28b53b9eb452 Version: $LATEST
2024-02-17T23:48:44.155Z  ac0356fb-9bc5-4ca8-9908-28b53b9eb452    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:44.837Z  ac0356fb-9bc5-4ca8-9908-28b53b9eb452    INFO    Response status: 200 Google
2024-02-17T23:48:44.837Z  ac0356fb-9bc5-4ca8-9908-28b53b9eb452    INFO    Closing the browser...
2024-02-17T23:48:44.879Z  ac0356fb-9bc5-4ca8-9908-28b53b9eb452    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1002M   23M  98% /tmp
END RequestId: ac0356fb-9bc5-4ca8-9908-28b53b9eb452
REPORT RequestId: ac0356fb-9bc5-4ca8-9908-28b53b9eb452    Duration: 778.45 ms     Billed Duration: 779 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: fe0f5431-7d26-4082-9e47-fd0565bda65c Version: $LATEST
2024-02-17T23:48:45.049Z  fe0f5431-7d26-4082-9e47-fd0565bda65c    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:45.646Z  fe0f5431-7d26-4082-9e47-fd0565bda65c    INFO    Response status: 200 Google
2024-02-17T23:48:45.646Z  fe0f5431-7d26-4082-9e47-fd0565bda65c    INFO    Closing the browser...
2024-02-17T23:48:45.695Z  fe0f5431-7d26-4082-9e47-fd0565bda65c    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1004M   21M  98% /tmp
END RequestId: fe0f5431-7d26-4082-9e47-fd0565bda65c
REPORT RequestId: fe0f5431-7d26-4082-9e47-fd0565bda65c    Duration: 706.68 ms     Billed Duration: 707 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 7aea8121-2a46-428b-9338-36931f6813b0 Version: $LATEST
2024-02-17T23:48:45.868Z  7aea8121-2a46-428b-9338-36931f6813b0    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:46.356Z  7aea8121-2a46-428b-9338-36931f6813b0    INFO    Response status: 200 Google
2024-02-17T23:48:46.356Z  7aea8121-2a46-428b-9338-36931f6813b0    INFO    Closing the browser...
2024-02-17T23:48:46.514Z  7aea8121-2a46-428b-9338-36931f6813b0    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1004M   21M  98% /tmp
END RequestId: 7aea8121-2a46-428b-9338-36931f6813b0
REPORT RequestId: 7aea8121-2a46-428b-9338-36931f6813b0    Duration: 708.33 ms     Billed Duration: 709 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 410cc0cb-8a50-4cab-aac9-c8ffa52eb13c Version: $LATEST
2024-02-17T23:48:46.687Z  410cc0cb-8a50-4cab-aac9-c8ffa52eb13c    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:47.165Z  410cc0cb-8a50-4cab-aac9-c8ffa52eb13c    INFO    Response status: 200 Google
2024-02-17T23:48:47.165Z  410cc0cb-8a50-4cab-aac9-c8ffa52eb13c    INFO    Closing the browser...
2024-02-17T23:48:47.322Z  410cc0cb-8a50-4cab-aac9-c8ffa52eb13c    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1004M   21M  98% /tmp
END RequestId: 410cc0cb-8a50-4cab-aac9-c8ffa52eb13c
REPORT RequestId: 410cc0cb-8a50-4cab-aac9-c8ffa52eb13c    Duration: 696.85 ms     Billed Duration: 697 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: ccf19014-0629-4f75-8024-1d8db1fad839 Version: $LATEST
2024-02-17T23:48:47.495Z  ccf19014-0629-4f75-8024-1d8db1fad839    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:48.003Z  ccf19014-0629-4f75-8024-1d8db1fad839    INFO    Response status: 200 Google
2024-02-17T23:48:48.003Z  ccf19014-0629-4f75-8024-1d8db1fad839    INFO    Closing the browser...
2024-02-17T23:48:48.166Z  ccf19014-0629-4f75-8024-1d8db1fad839    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1004M   21M  98% /tmp
END RequestId: ccf19014-0629-4f75-8024-1d8db1fad839
REPORT RequestId: ccf19014-0629-4f75-8024-1d8db1fad839    Duration: 735.81 ms     Billed Duration: 736 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 1bc2daf7-709c-4ed4-97ee-96a49a9cb053 Version: $LATEST
2024-02-17T23:48:48.348Z  1bc2daf7-709c-4ed4-97ee-96a49a9cb053    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:48.881Z  1bc2daf7-709c-4ed4-97ee-96a49a9cb053    INFO    Response status: 200 Google
2024-02-17T23:48:48.881Z  1bc2daf7-709c-4ed4-97ee-96a49a9cb053    INFO    Closing the browser...
2024-02-17T23:48:49.002Z  1bc2daf7-709c-4ed4-97ee-96a49a9cb053    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1004M   21M  98% /tmp
END RequestId: 1bc2daf7-709c-4ed4-97ee-96a49a9cb053
REPORT RequestId: 1bc2daf7-709c-4ed4-97ee-96a49a9cb053    Duration: 722.28 ms     Billed Duration: 723 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 438ee63f-01b1-4884-855e-1c0738de1416 Version: $LATEST
2024-02-17T23:48:49.179Z  438ee63f-01b1-4884-855e-1c0738de1416    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:49.802Z  438ee63f-01b1-4884-855e-1c0738de1416    INFO    Response status: 200 Google
2024-02-17T23:48:49.802Z  438ee63f-01b1-4884-855e-1c0738de1416    INFO    Closing the browser...
2024-02-17T23:48:49.839Z  438ee63f-01b1-4884-855e-1c0738de1416    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1004M   21M  98% /tmp
END RequestId: 438ee63f-01b1-4884-855e-1c0738de1416
REPORT RequestId: 438ee63f-01b1-4884-855e-1c0738de1416    Duration: 722.41 ms     Billed Duration: 723 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 26a1bf1f-932b-437e-8349-d37ca06c275c Version: $LATEST
2024-02-17T23:48:50.006Z  26a1bf1f-932b-437e-8349-d37ca06c275c    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:50.481Z  26a1bf1f-932b-437e-8349-d37ca06c275c    INFO    Response status: 200 Google
2024-02-17T23:48:50.481Z  26a1bf1f-932b-437e-8349-d37ca06c275c    INFO    Closing the browser...
2024-02-17T23:48:50.639Z  26a1bf1f-932b-437e-8349-d37ca06c275c    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1004M   21M  98% /tmp
END RequestId: 26a1bf1f-932b-437e-8349-d37ca06c275c
REPORT RequestId: 26a1bf1f-932b-437e-8349-d37ca06c275c    Duration: 687.86 ms     Billed Duration: 688 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: e1f28509-672d-4833-b2db-b521bb4df170 Version: $LATEST
2024-02-17T23:48:50.807Z  e1f28509-672d-4833-b2db-b521bb4df170    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:51.376Z  e1f28509-672d-4833-b2db-b521bb4df170    INFO    Response status: 200 Google
2024-02-17T23:48:51.376Z  e1f28509-672d-4833-b2db-b521bb4df170    INFO    Closing the browser...
2024-02-17T23:48:51.646Z  e1f28509-672d-4833-b2db-b521bb4df170    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1004M   21M  98% /tmp
END RequestId: e1f28509-672d-4833-b2db-b521bb4df170
REPORT RequestId: e1f28509-672d-4833-b2db-b521bb4df170    Duration: 897.28 ms     Billed Duration: 898 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 28ce27d6-12eb-491c-83cd-5991dc57eaca Version: $LATEST
2024-02-17T23:48:51.800Z  28ce27d6-12eb-491c-83cd-5991dc57eaca    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:52.409Z  28ce27d6-12eb-491c-83cd-5991dc57eaca    INFO    Response status: 200 Google
2024-02-17T23:48:52.409Z  28ce27d6-12eb-491c-83cd-5991dc57eaca    INFO    Closing the browser...
2024-02-17T23:48:52.448Z  28ce27d6-12eb-491c-83cd-5991dc57eaca    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1004M   21M  98% /tmp
END RequestId: 28ce27d6-12eb-491c-83cd-5991dc57eaca
REPORT RequestId: 28ce27d6-12eb-491c-83cd-5991dc57eaca    Duration: 694.38 ms     Billed Duration: 695 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: c45a4001-3de5-448e-846a-cdb97f53b51d Version: $LATEST
2024-02-17T23:48:52.620Z  c45a4001-3de5-448e-846a-cdb97f53b51d    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:53.110Z  c45a4001-3de5-448e-846a-cdb97f53b51d    INFO    Response status: 200 Google
2024-02-17T23:48:53.110Z  c45a4001-3de5-448e-846a-cdb97f53b51d    INFO    Closing the browser...
2024-02-17T23:48:53.172Z  c45a4001-3de5-448e-846a-cdb97f53b51d    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1010M   15M  99% /tmp
END RequestId: c45a4001-3de5-448e-846a-cdb97f53b51d
REPORT RequestId: c45a4001-3de5-448e-846a-cdb97f53b51d    Duration: 611.73 ms     Billed Duration: 612 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 63a41a59-6354-4fd5-a152-ea05f6aeaf0e Version: $LATEST
2024-02-17T23:48:53.353Z  63a41a59-6354-4fd5-a152-ea05f6aeaf0e    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:53.787Z  63a41a59-6354-4fd5-a152-ea05f6aeaf0e    INFO    Response status: 200 Google
2024-02-17T23:48:53.787Z  63a41a59-6354-4fd5-a152-ea05f6aeaf0e    INFO    Closing the browser...
2024-02-17T23:48:53.827Z  63a41a59-6354-4fd5-a152-ea05f6aeaf0e    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1010M   15M  99% /tmp
END RequestId: 63a41a59-6354-4fd5-a152-ea05f6aeaf0e
REPORT RequestId: 63a41a59-6354-4fd5-a152-ea05f6aeaf0e    Duration: 541.38 ms     Billed Duration: 542 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: a5f86d89-af41-429b-98ad-97b89788ca78 Version: $LATEST
2024-02-17T23:48:54.008Z  a5f86d89-af41-429b-98ad-97b89788ca78    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:54.429Z  a5f86d89-af41-429b-98ad-97b89788ca78    INFO    Response status: 200 Google
2024-02-17T23:48:54.429Z  a5f86d89-af41-429b-98ad-97b89788ca78    INFO    Closing the browser...
2024-02-17T23:48:54.630Z  a5f86d89-af41-429b-98ad-97b89788ca78    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1010M   15M  99% /tmp
END RequestId: a5f86d89-af41-429b-98ad-97b89788ca78
REPORT RequestId: a5f86d89-af41-429b-98ad-97b89788ca78    Duration: 690.29 ms     Billed Duration: 691 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 32831137-59c3-42a2-a1b4-b39612e63ede Version: $LATEST
2024-02-17T23:48:54.816Z  32831137-59c3-42a2-a1b4-b39612e63ede    INFO    Navigating to: https://www.google.com
2024-02-17T23:48:55.238Z  32831137-59c3-42a2-a1b4-b39612e63ede    INFO    Response status: 200 Google
2024-02-17T23:48:55.239Z  32831137-59c3-42a2-a1b4-b39612e63ede    INFO    Closing the browser...
2024-02-17T23:48:55.442Z  32831137-59c3-42a2-a1b4-b39612e63ede    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1010M   15M  99% /tmp
END RequestId: 32831137-59c3-42a2-a1b4-b39612e63ede
REPORT RequestId: 32831137-59c3-42a2-a1b4-b39612e63ede    Duration: 698.58 ms     Billed Duration: 699 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 057301c1-bffc-447a-8c41-25bd0c46a120 Version: $LATEST
2024-02-17T23:49:36.963Z  057301c1-bffc-447a-8c41-25bd0c46a120    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:37.398Z  057301c1-bffc-447a-8c41-25bd0c46a120    INFO    Response status: 200 Google
2024-02-17T23:49:37.398Z  057301c1-bffc-447a-8c41-25bd0c46a120    INFO    Closing the browser...
2024-02-17T23:49:37.443Z  057301c1-bffc-447a-8c41-25bd0c46a120    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1010M   15M  99% /tmp
END RequestId: 057301c1-bffc-447a-8c41-25bd0c46a120
REPORT RequestId: 057301c1-bffc-447a-8c41-25bd0c46a120    Duration: 540.32 ms     Billed Duration: 541 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: bcea64ce-356e-4bc3-8b73-f2878b19bb0a Version: $LATEST
2024-02-17T23:49:37.659Z  bcea64ce-356e-4bc3-8b73-f2878b19bb0a    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:38.103Z  bcea64ce-356e-4bc3-8b73-f2878b19bb0a    INFO    Response status: 200 Google
2024-02-17T23:49:38.103Z  bcea64ce-356e-4bc3-8b73-f2878b19bb0a    INFO    Closing the browser...
2024-02-17T23:49:38.152Z  bcea64ce-356e-4bc3-8b73-f2878b19bb0a    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1012M   13M  99% /tmp
END RequestId: bcea64ce-356e-4bc3-8b73-f2878b19bb0a
REPORT RequestId: bcea64ce-356e-4bc3-8b73-f2878b19bb0a    Duration: 565.18 ms     Billed Duration: 566 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: c6d0cafe-bc03-4643-bc39-2963f061ed76 Version: $LATEST
2024-02-17T23:49:38.339Z  c6d0cafe-bc03-4643-bc39-2963f061ed76    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:39.500Z  c6d0cafe-bc03-4643-bc39-2963f061ed76    INFO    Response status: 200 Google
2024-02-17T23:49:39.500Z  c6d0cafe-bc03-4643-bc39-2963f061ed76    INFO    Closing the browser...
2024-02-17T23:49:39.544Z  c6d0cafe-bc03-4643-bc39-2963f061ed76    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1013M   12M  99% /tmp
END RequestId: c6d0cafe-bc03-4643-bc39-2963f061ed76
REPORT RequestId: c6d0cafe-bc03-4643-bc39-2963f061ed76    Duration: 1271.99 ms    Billed Duration: 1272 ms        Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: d24fe1c8-0faa-4631-a57c-2faa1c3904c0 Version: $LATEST
2024-02-17T23:49:39.727Z  d24fe1c8-0faa-4631-a57c-2faa1c3904c0    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:40.189Z  d24fe1c8-0faa-4631-a57c-2faa1c3904c0    INFO    Response status: 200 Google
2024-02-17T23:49:40.189Z  d24fe1c8-0faa-4631-a57c-2faa1c3904c0    INFO    Closing the browser...
2024-02-17T23:49:40.231Z  d24fe1c8-0faa-4631-a57c-2faa1c3904c0    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1014M   11M  99% /tmp
END RequestId: d24fe1c8-0faa-4631-a57c-2faa1c3904c0
REPORT RequestId: d24fe1c8-0faa-4631-a57c-2faa1c3904c0    Duration: 576.77 ms     Billed Duration: 577 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 307446b8-4f42-4ac7-b1cd-ad7831c79b61 Version: $LATEST
2024-02-17T23:49:40.410Z  307446b8-4f42-4ac7-b1cd-ad7831c79b61    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:41.413Z  307446b8-4f42-4ac7-b1cd-ad7831c79b61    INFO    Response status: 200 Google
2024-02-17T23:49:41.413Z  307446b8-4f42-4ac7-b1cd-ad7831c79b61    INFO    Closing the browser...
2024-02-17T23:49:41.494Z  307446b8-4f42-4ac7-b1cd-ad7831c79b61    INFO    df -h /tmp:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdd        1.1G 1014M   11M  99% /tmp
END RequestId: 307446b8-4f42-4ac7-b1cd-ad7831c79b61
REPORT RequestId: 307446b8-4f42-4ac7-b1cd-ad7831c79b61    Duration: 1145.56 ms    Billed Duration: 1146 ms        Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: d87622b4-bba3-4f79-be35-65ad8aad83ea Version: $LATEST
2024-02-17T23:49:41.666Z  d87622b4-bba3-4f79-be35-65ad8aad83ea    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:41.959Z  d87622b4-bba3-4f79-be35-65ad8aad83ea    ERROR   Unexpected Error: page.goto: Target page, context or browser has been closed
Call log:
  - navigating to "https://www.google.com/", waiting until "load"

    at Array.<anonymous> (/var/task/routes.js:23:35)
    at async Runtime.handler (/var/task/node_modules/.pnpm/[email protected]/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js:53:21)
    at async Runtime.handleOnceStreaming (/var/runtime/index.mjs:1206:26)
2024-02-17T23:49:41.960Z  d87622b4-bba3-4f79-be35-65ad8aad83ea    INFO    Closing the browser...
END RequestId: d87622b4-bba3-4f79-be35-65ad8aad83ea
REPORT RequestId: d87622b4-bba3-4f79-be35-65ad8aad83ea    Duration: 356.68 ms     Billed Duration: 357 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: ae256f14-c71f-4247-a347-a3c8a30647f5 Version: $LATEST
2024-02-17T23:49:42.140Z  ae256f14-c71f-4247-a347-a3c8a30647f5    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:42.442Z  ae256f14-c71f-4247-a347-a3c8a30647f5    ERROR   Unexpected Error: page.goto: Target page, context or browser has been closed
Call log:
  - navigating to "https://www.google.com/", waiting until "load"

    at Array.<anonymous> (/var/task/routes.js:23:35)
    at async Runtime.handler (/var/task/node_modules/.pnpm/[email protected]/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js:53:21)
    at async Runtime.handleOnceStreaming (/var/runtime/index.mjs:1206:26)
2024-02-17T23:49:42.442Z  ae256f14-c71f-4247-a347-a3c8a30647f5    INFO    Closing the browser...
END RequestId: ae256f14-c71f-4247-a347-a3c8a30647f5
REPORT RequestId: ae256f14-c71f-4247-a347-a3c8a30647f5    Duration: 359.22 ms     Billed Duration: 360 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: d75e52e2-1473-4993-be78-f108e7313668 Version: $LATEST
2024-02-17T23:49:42.614Z  d75e52e2-1473-4993-be78-f108e7313668    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:42.890Z  d75e52e2-1473-4993-be78-f108e7313668    ERROR   Unexpected Error: page.goto: Target page, context or browser has been closed
Call log:
  - navigating to "https://www.google.com/", waiting until "load"

    at Array.<anonymous> (/var/task/routes.js:23:35)
    at async Runtime.handler (/var/task/node_modules/.pnpm/[email protected]/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js:53:21)
    at async Runtime.handleOnceStreaming (/var/runtime/index.mjs:1206:26)
2024-02-17T23:49:42.890Z  d75e52e2-1473-4993-be78-f108e7313668    INFO    Closing the browser...
END RequestId: d75e52e2-1473-4993-be78-f108e7313668
REPORT RequestId: d75e52e2-1473-4993-be78-f108e7313668    Duration: 343.92 ms     Billed Duration: 344 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 07313c8c-e13f-4217-80b3-eb69aef77431 Version: $LATEST
2024-02-17T23:49:43.062Z  07313c8c-e13f-4217-80b3-eb69aef77431    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:43.269Z  07313c8c-e13f-4217-80b3-eb69aef77431    ERROR   Unexpected Error: page.goto: net::ERR_INSUFFICIENT_RESOURCES at https://www.google.com/
Call log:
  - navigating to "https://www.google.com/", waiting until "load"

    at Array.<anonymous> (/var/task/routes.js:23:35)
    at async Runtime.handler (/var/task/node_modules/.pnpm/[email protected]/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js:53:21)
    at async Runtime.handleOnceStreaming (/var/runtime/index.mjs:1206:26) {
  name: 'Error'
}
2024-02-17T23:49:43.270Z  07313c8c-e13f-4217-80b3-eb69aef77431    INFO    Closing the browser...
END RequestId: 07313c8c-e13f-4217-80b3-eb69aef77431
REPORT RequestId: 07313c8c-e13f-4217-80b3-eb69aef77431    Duration: 302.25 ms     Billed Duration: 303 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB
START RequestId: 54abde91-ed73-4e23-a635-a7a663c96c70 Version: $LATEST
2024-02-17T23:49:43.490Z  54abde91-ed73-4e23-a635-a7a663c96c70    INFO    Navigating to: https://www.google.com
2024-02-17T23:49:43.707Z  54abde91-ed73-4e23-a635-a7a663c96c70    ERROR   Unexpected Error: page.goto: net::ERR_INSUFFICIENT_RESOURCES at https://www.google.com/
Call log:
  - navigating to "https://www.google.com/", waiting until "load"

    at Array.<anonymous> (/var/task/routes.js:23:35)
    at async Runtime.handler (/var/task/node_modules/.pnpm/[email protected]/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js:53:21)
    at async Runtime.handleOnceStreaming (/var/runtime/index.mjs:1206:26) {
  name: 'Error'
}
2024-02-17T23:49:43.707Z  54abde91-ed73-4e23-a635-a7a663c96c70    INFO    Closing the browser...
END RequestId: 54abde91-ed73-4e23-a635-a7a663c96c70
REPORT RequestId: 54abde91-ed73-4e23-a635-a7a663c96c70    Duration: 313.69 ms     Billed Duration: 314 ms Memory Size: 8192 MB    Max Memory Used: 1399 MB

Possible Solution

I wish i knew of one, I am stumped so far. I have tried increasing to 4GB and 8 GB and it still fills up all the space.

@sg650 sg650 added the bug Something isn't working label Feb 17, 2024
@sg650 sg650 changed the title [BUG] Lambda /tmp fills up quickly [BUG] [Playwright] Lambda /tmp fills up quickly Feb 19, 2024
@sg650
Copy link
Author

sg650 commented Feb 19, 2024

@Sparticuz This seems to only happen when using Playwright. With puppeteer the /tmp space doesn't grow like this. Any ideas?

@milesmmoran
Copy link

Did you ever resolve this? Getting similiar results with playright

@milesmmoran
Copy link

@Sparticuz Any insight here? Enjoy your travels, and thanks for the great tool.

@zirkelc
Copy link

zirkelc commented Oct 4, 2024

I had the same problem with Playwright even running on a Python Docker Image on Lambda.
I posted about it in the Playwright Discord server, but never got a response: https://discord.com/channels/807756831384403968/1230133049090379827/1230133049090379827

In my post I said Lambda is running out of memory until it crashes, but it had the same problem with /tmp/* filling up. Depending on the configuration, either memory or storage runs out first and causes Lambda to crash.

So I think this issue should probably be moved to the Playwright repo, even though I don't think you'll get any help tehre.

@QAnders
Copy link

QAnders commented Oct 16, 2024

Any update on this?

I assume it's more of a Puppeteer issue though, but we have the same issue when trying to generate a large number of PDF's... We get a few thousand Invoices (as XML) from a customer and then we need to generate PDF's for these. We have set ephemeral storage to 10GB and we can generate some 600-700 PDF's (invokations) before it runs out of /tmp space, with either ENOSPC: no space left on device, mkdtemp '/tmp/ or

2024-10-16T11:55:09.278Z	c5b6c5f7-d891-4760-a2a7-0c2659ab20a8	INFO	htmltopdf getting this error Error: Failed to launch the browser process!
[1016/115509.269172:ERROR:platform_thread_posix.cc(155)] pthread_create: Resource temporarily unavailable (11)
[1016/115509.269211:ERROR:platform_thread_posix.cc(155)] pthread_create: Resource temporarily unavailable (11)
[1016/115509.269328:ERROR:platform_thread_posix.cc(155)] pthread_create: Resource temporarily unavailable (11)
[1016/115509.269544:FATAL:browser_task_executor.cc(310)] Failed to start BrowserThread:IO

AWS is not using "isolated" /tmp storage per invokation, even if we set ephemeral storage size for a Lambda, so it runs out of /tmp space when we have concurrent invokations. We can't delete /tmp in one Lambda either, as each concurrent Lambda is using the same "disk".
We tried this and then the other concurrent Lambdas "crash" as the /tmp files they had written is gone.

So, is it possible to know which files "belongs" to which invokation to only delete the ones belonging to that instance?

I've raised a support ticket with AWS as IMO the ephemeral storage should be available as the set value for EVERY invokation. That's how I interpret this article as well: https://aws.amazon.com/blogs/compute/using-larger-ephemeral-storage-for-aws-lambda/

To add to this, I can see in the puppeteer-core files that there's a "Configuration.ts" file where it states:

/**
     * Defines the directory to be used by Puppeteer for creating temporary files.
     *
     * Can be overridden by `PUPPETEER_TMP_DIR`.
     *
     * @defaultValue `os.tmpdir()`
     */
    temporaryDirectory?: string;

However, I can't find any code where PUPPETEER_TMP_DIR env.var is actually used... My guess is that this is an old and forgotten feature...?
Then it checks if to use temporaryDirectory or the native os.tmpdir and as temporaryDirectory will never be set it will always just use /tmp...

@QAnders
Copy link

QAnders commented Oct 21, 2024

After some more investigation I came up with a slight "ugly-fix" to the problem...

const puppeteer = require('puppeteer-core');
const chromium = require('@sparticuz/chromium');
const uuid = require('uuid');
const fs = require('fs');

// code here...
  chromium.args = [
      '--no-sandbox',
      '--headless',
      '--disable-gpu',
      '--disable-dev-shm-usage'
    ];

  const {args} = chromium;
  const tmpDirKey = uuid.v4();
  args.push(`--user-data-dir=/tmp/${tmpDirKey}`); // chromium neglects this arg, so we add it ourselves

  const browser = await puppeteer.launch({
    args,
    defaultViewport: chromium.defaultViewport,
    executablePath,
    headless: true,
    ignoreHTTPSErrors: true
  });

// more code to do stuff

  console.info(`Cleaning up /tmp/${tmpDirKey}...`);
  await fs.rmSync(`/tmp/${tmpDirKey}`, { recursive: true, force: true });

--user-data-dir argument is omitted through Chromium, so we need to add it "manually".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants