Comments (10)
Awww I was worried about this, it probably happens on websites with a lot of pages, I probably need to make sure I don’t run critical
more than X times at once :(
See here, should be straightforward:
https://github.com/Tom-Bonnike/netlify-plugin-inline-critical-css/blob/master/index.js#L21-L36
I think the max listener thing is not such a big issue, but since it runs concurrently, I think it’s definitely what’s causing the issue. I’ll look into using https://github.com/rxaviers/async-pool
from netlify-plugin-inline-critical-css.
See https://github.com/Tom-Bonnike/netlify-plugin-inline-critical-css/pull/4/files @ehmicky, I’ll test this locally on my own project but it’s not big enough to get this issue :/ Hope a limit of 4 is good, I might need to adjust it later if it still happens.
from netlify-plugin-inline-critical-css.
Just published 1.0.4, please let me know if the error still happens, I’ll decrease to a max concurrency of 2.
from netlify-plugin-inline-critical-css.
Hi @Tom-Bonnike, yes thanks! I will approve it right away :)
However making the version go live still require a manual process from us at the moment. We are currently working on automating the process.
from netlify-plugin-inline-critical-css.
I’ll close for now, we can re-open if it starts showing up again, might just be because few people are using it atm 😄
from netlify-plugin-inline-critical-css.
I think i’ll just stop running critical concurrently, might also fix #5, at the cost of a slower execution
from netlify-plugin-inline-critical-css.
@ehmicky should I update the version in the plugins.json
on the netlify/plugins repo?
from netlify-plugin-inline-critical-css.
Did you notice more similar errors in the last days? :)
from netlify-plugin-inline-critical-css.
No! :)
from netlify-plugin-inline-critical-css.
It looks like this is still happening:
┌────────────────────────────────────────────────────────────────┐
│ 4. onPostBuild command from netlify-plugin-inline-critical-css │
└────────────────────────────────────────────────────────────────┘
<--- Last few GCs --->
[1393:0x488ec30] 114467 ms: Mark-sweep 2044.6 (2058.2) -> 2044.5 (2058.2) MB, 56.5 / 0.0 ms (average mu = 0.104, current mu = 0.000) last resort GC in old space requested
[1393:0x488ec30] 114546 ms: Mark-sweep 2044.5 (2058.2) -> 2044.5 (2058.2) MB, 78.8 / 0.1 ms (average mu = 0.050, current mu = 0.000) last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x13c5b79]
1: StubFrame [pc: 0x1402bb0]
Security context: 0x3a80b2c808d1 <JSObject>
2: replace [0x3a80b2c963d9](this=0x18d95fa40119 <Very long string[253132]>,0x110fc4fb6921 <JSRegExp <String[#20]: (<head(?:\\s[^>]*)?>)>>,0x110fc4fbaf31 <String[17]: $1<style></style>>)
3: preparePenthouseData(aka preparePenthouseData) [0x26b1cd429061] [/opt/buildhome/.netlify-build-plugins/node_modules/critical/src/file.js...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: 0xa09830 node::Abort() [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
2: 0xa09c55 node::OnFatalError(char const*, char const*) [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
3: 0xb7d71e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
4: 0xb7da99 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
5: 0xd2a1f5 [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
6: 0xd3ab08 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
7: 0xd08fad v8::internal::Factory::NewRawTwoByteString(int, v8::internal::AllocationType) [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
8: 0x10c08f4 v8::internal::ReplacementStringBuilder::ToString() [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
9: 0x106fabb [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
10: 0x1070c7a v8::internal::Runtime_RegExpReplaceRT(int, unsigned long*, v8::internal::Isolate*) [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
11: 0x13c5b79 [/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/bin/node]
This is using [email protected]
.
The repository is private. The plugin was using the default inputs.
This is all the information that this build is showing unfortunately.
from netlify-plugin-inline-critical-css.
Related Issues (20)
- Parallelize execution directly via `critical`
- EISDIR: illegal operation on a directory, read HOT 3
- `ENOENT` error when deleting a file
- Site is first showing content without css HOT 5
- Not all pages get inline critical css
- Plugin error not telling me where the error was HOT 1
- Feature: Stylesheet optimization ruins CSS inlining HOT 5
- Plugin "netlify-plugin-inline-critical-css" failed: Failed to launch the browser process! HOT 2
- "unknown rule" with prism.css HOT 2
- Debugging help - file not found style.css, but not referenced in my site HOT 3
- postcss-discard: postcss.plugin was deprecated HOT 3
- Resolve it's own dependencies HOT 1
- Plugin removes inline JavaScript from <head> HOT 1
- Failing on page with large json schema HOT 3
- SyntaxError: 'noscript)>[rel="stylesheet"]' is not a valid selector HOT 8
- Lingering puppeteer processes cause penthouse to timeout and build to fail HOT 11
- Error `Cannot read property 'clear' of undefined` HOT 7
- Error `Cannot read property 'walkDecls' of undefined` HOT 3
- `src and type required ` HOT 4
- `Failed to launch chrome` error HOT 6
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 netlify-plugin-inline-critical-css.