Comments (10)
Thanks for using memlab. I can increase the default protocol timeout (currently it's 180s based on puppeteer's default setting) and perhaps adding a new option to allow setting protocol timeout via CLI.
from memlab.
Yes, that would be great, thanks. I would appreciate it if you could notify me once it's done, as we need Memlab's result for an urgent task :)
from memlab.
@JacksonGL Sorry to bother you again, but could I get an estimate of when the above issue will be resolved? Thanks.
from memlab.
@Arooba-git I have a diff draft ready, but Monday is a holiday in the US (need my co-worker's review to ship it). So hopefully it will be landed on Tuesday. The code change will be linked to this GitHub issue, so GitHub should send a notification once the change is synced here.
In the meantime, if you need this earlier, please make this change here to your local git clone of memlab to unblock:
this.puppeteerConfig = {
protocolTimeout: 5 * 60 * 1000, // set timeout to be 5 minutes
...
}
Then add proper typing annotations and build the local copy
from memlab.
@Arooba-git The default protocol timeout has been increased from 3 minutes to 5 minutes. You can also use the new CLI flag --protocol-timeout <timeout-in-ms>
to further increase the timeout in memlab v1.1.43.
from memlab.
@JacksonGL Thanks for the prompt action. I'll try it out today 👍
from memlab.
@JacksonGL Unfortunately I am getting the same error.. even after passing the --protocol-timeout with 300+ minutes (20000000 ms) :(. If I provide you with the scenario files it is happening on, would you be able to perhaps assist in finding out the root cause since I don't have much experience with Puppeteer, and it seems like the library's internal issue?
from memlab.
@Arooba-git I tested the new --protocol-timeout
flag and it does timeout when I set the timeout to be very small, so the code change here indeed increased the protocol timeout.
The exception from your screenshot shows that it is thrown from Puppeteer's code; and, therefore it is outside of MemLab's scope. This is likely related to the connection between puppeteer and the headless browser. I would recommend filing a bug report on the Puppeteer's GitHub repo.
My guess is that either 1) 1.4GB of memory is too much for Chrome to capture the heap snapshot (you could try taking the 1.4GB heap snapshot manually in Chrome DevTools to see if the Browser DevTools times out) or 2) the connection between Puppeteer and Chrome was not designed to handle such a large heap snapshot.
Moreover, if a web app uses more than 1GB JS heap, it has some serious memory issues. I would recommend testing on a scenario where the memory leak is less severe.
from memlab.
Alright, I'll do that then. 👍 Thank you for the guidance! You may close this issue.
P.S: While we are here, could you kindly take a look at this issue. I have spent 2 days trying to figure it out, and though it is not directly related to Memlab, I thought you might have some suggestions for this roadblock. Thanks.
from memlab.
MemLab disables notification in browser by default:
To quickly see if it unblocks, you can comment out this flag and build it locally:
memlab/packages/core/src/lib/Config.ts
Lines 304 to 305 in 73c9fa3
Feel free to open a separate issue about this.
from memlab.
Related Issues (20)
- Can't switch chrome version HOT 2
- Idea - Question - Discussion - Using memlab to refactor code targeting different framework philosphy HOT 1
- Question - How does it pull memory information ? HOT 1
- 老哥有点问题,本地默认安装你的仓库里面有个依赖包引入 colors 的包默认是1.4.2的 被污染的那个包 导致 启动不起来,windows 开发环境, HOT 2
- Question: Any idea about ignoring weak reference and circular reference in heap snapshot? HOT 7
- core_1.browserInfo.setPuppeteerConfig is not a function HOT 2
- Is there a way to run in scripting mode using silent? HOT 4
- Could not find Chrome (ver. 121.0.6167.85). This can occur if either 1. you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`) or 2. your cache path is incorrectly configured HOT 3
- Could not find Chrome (ver. 121.0.6167.85). This can occur if either 1. you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`) or 2. your cache path is incorrectly configured
- Keep `@memlab/*` versions in lockstep in package.json HOT 1
- how to handle Page crashed error ,when execute the run method。 HOT 1
- how to get leak info from memlab console HOT 6
- Clarify the documentation about measure mode HOT 3
- Invalid scenario file HOT 8
- Add ESM support for @memlab/api (and remaining) HOT 4
- Puppeteer browser.close() hangs on AWS Lambda HOT 2
- TypeError: core_1.utils.tryToMutePuppeteerWarning is not a function HOT 2
- Error occurs when executing scenarios involving dialog display HOT 1
- Need guidance on accessing elements in code using heap object ID HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memlab.