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

Handle ENOMEM gracefully in memory snapshotter in AutoscaledPool #307

Closed
jancurn opened this issue Feb 14, 2019 · 4 comments
Closed

Handle ENOMEM gracefully in memory snapshotter in AutoscaledPool #307

jancurn opened this issue Feb 14, 2019 · 4 comments
Labels
good first issue Good for newcomers.

Comments

@jancurn
Copy link
Member

jancurn commented Feb 14, 2019

Memory snapshotter in AutoscaledPool could handle ENOMEM from spawn gracefully - basically it's also an information that memory is overloaded. Now we just print this error, which is confusing for users:

2019-02-14T10:03:17.148Z ERROR: Snapshotter: Memory snapshot failed.
2019-02-14T10:03:17.149Z   Error: spawn ENOMEM
2019-02-14T10:03:17.151Z     at ChildProcess.spawn (internal/child_process.js:313:11)
2019-02-14T10:03:17.152Z     at exports.spawn (child_process.js:508:9)
2019-02-14T10:03:17.154Z     at childrenOfPid (/home/myuser/node_modules/@apify/ps-tree/index.js:53:21)
2019-02-14T10:03:17.155Z     at childrenOfPid (internal/util.js:235:26)
2019-02-14T10:03:17.162Z     at getMemoryInfo (/home/myuser/node_modules/apify/build/utils.js:268:3)
2019-02-14T10:03:17.240Z     at Snapshotter._snapshotMemory (/home/myuser/node_modules/apify/build/autoscaling/snapshotter.js:241:55)
2019-02-14T10:03:17.251Z     at Timeout.funcWrapper [as _onTimeout] (/home/myuser/node_modules/apify-shared/utilities.js:147:9)
2019-02-14T10:03:17.253Z     at ontimeout (timers.js:498:11)
2019-02-14T10:03:17.254Z     at tryOnTimeout (timers.js:323:5)
2019-02-14T10:03:17.256Z     at Timer.listOnTimeout (timers.js:290:5)
@jancurn
Copy link
Member Author

jancurn commented Feb 14, 2019

Another option is to handle this transparently in Apify.getMemoryInfo()

@B4nan
Copy link
Member

B4nan commented Jul 27, 2022

Is this still valid?

@mnmkng
Copy link
Member

mnmkng commented Jul 27, 2022

Have not seen this error since then so it's probably fixed.

@B4nan
Copy link
Member

B4nan commented Jul 27, 2022

Let's reopen if it occurs again

@B4nan B4nan closed this as completed Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers.
Projects
None yet
Development

No branches or pull requests

3 participants