#More than 120 unbound worker fetch handlers scheduled to the same isolate causing memory limit error

2 messages · Page 1 of 1 (latest)

brave flicker
#

I have an unbound worker that performs approximately 2 seconds of CPU-intensive processing. Periodically, a couple of times per week, I encounter "Exceeded memory" errors in bulks of 120-160 events. The fetch handler itself doesn't consume more than 10MB, so I've added additional logging with a global variable that increments at the fetch function's start and decrements upon return. The last time a bulk of 120 errors appeared on the dashboard, the logs showed that 120 fetch handlers were invoked in the same isolate. This doesn't make any sense for a CPU-bound handler, as all of these handlers will compete for the same resource. Is there any way to avoid this?

sacred pike