Hi,
I am running a puppeteer script on Lambda in headless mode.
After few urls, chromium browser crashes as it runs out of disk space (Lambda has /tmp storage of 512MB - HARD LIMIT)
However, running du command, I see only a small portion of disk space has been utilized.
So, I looked into process FD's and found a large number of deleted org.chromium files.
DF (df -m): Filesystem 1M-blocks Used Available Use% Mounted on
/dev/vdd 526 339 176 66% /tmp
DU:
8.0K /tmp/puppeteer_dev_chrome_profile-pg9wQc/Default/Code Cache/wasm/index-dir
16K /tmp/puppeteer_dev_chrome_profile-pg9wQc/Default/Code Cache/wasm8.0K /tmp/puppeteer_dev_chrome_profile-pg9wQc/Default/Code Cache/js/index-dir148K /tmp/puppeteer_dev_chrome_profile-pg9wQc/Default/Code Cache/js168K /tmp/puppeteer_dev_chrome_profile-pg9wQc/Default/Code Cache4.0K /tmp/puppeteer_dev_chrome_profile-pg9wQc/Default/blob_storage/f86b4787-bad6-4642-942c-75d1f898a1de8.0K /tmp/puppeteer_dev_chrome_profile-pg9wQc/Default/blob_storage40K /tmp/puppeteer_dev_chrome_profile-pg9wQc/Default/GPUCache240K /tmp/puppeteer_dev_chrome_profile-pg9wQc/Default248K /tmp/puppeteer_dev_chrome_profile-pg9wQc4.0K /tmp/locales3.2M /tmp/aws/lib976K /tmp/aws/.fonts/Open_Sans980K /tmp/aws/.fonts4.2M /tmp/aws8.0K /tmp/cache-dir/index-dir1.5M /tmp/cache-dir4.8M /tmp/swiftshader140M /tmp ---------------------> /tmp disk usage is clearly 140MB. But DF shows 339MB is used.
I can see many chromium process FD's holding onto org.chromium.Chromium.* deleted files. These files are up to 4MB in size and i found around 40 such deleted files when listed process FDs. (around 35 of which are 4MBs each).
Total size of /tmp/.org.chromium.Chromium.* files was found to be 160MB.
One such FD : (Complete list is attached)
{
"name": "/tmp/.org.chromium.Chromium.zGlQxn (deleted)",
"fd": "102",
"stat": {
"dev": 65072,
"mode": 33152,
"nlink": 0,
"uid": 496,
"gid": 495,
"rdev": 0,
"blksize": 4096,
"ino": 219,
"size": 4198400,
"blocks": 8200,
"atimeMs": 1595902017893.3027,
"mtimeMs": 1595902017937.3027,
"ctimeMs": 1595902017937.3027,
"birthtimeMs": 1595902017853.3027,
"atime": "2020-07-28T02:06:57.893Z",
"mtime": "2020-07-28T02:06:57.937Z",
"ctime": "2020-07-28T02:06:57.937Z",
"birthtime": "2020-07-28T02:06:57.853Z"
}
},
This looks like a chromium bug? After loading few more such pages, my disk use % increases up to 100% and browser finally crashes.
Why chromium is blocking large disk space even though files are deleted. When i terminate the process at the end of the script, all this extra space is released. But I am not able to run entire script successfully because
disk capacity runs out.
Any help is much appreciated. Thank you!