Open josephrocca opened 1 month ago
@josephrocca Are you suggesting that Deno is respecting the set resource limits, but it is not showing the correct values? Or are you saying it does neither?
@lucacasonato Deno seems to be ignoring the user-specified limits, and using its own. So it's showing 2048
, and I limiting to 2048
, but during creation I specified 16
. I've updated the issue to try to make that a bit more clear, thanks!
Version: Deno v2.0.0 (tested as far back as v1.41.3)
Below is a simplified version of this test:
And here's
./worker.mjs
:In Node.js it logs this:
And a simple large string allocation test shows that the limit is respected - i.e. it crashes with
FATAL ERROR: Reached heap limit Allocation failed
if the limit is hit.In Deno it logs the default values:
And note that the
16
MB value is not respected. I.e. it seems that theresourceLimits
log in the log shown above are "accurate" to the actual limits that the thread is held to, but obviously these are not the limits we asked for when creating the worker.Related Context: