how do i avoid this kind of memory error

how do i avoid this kind of memory error then? each individual request does not cause an out of memory error but when multiple hit the same isolate they do
2 Replies
Larry
Larry5w ago
If you only use instance variables (e.g. this.myVariable = 10) they won't be shared. Only when you assign something to the global scope by not preceding the variable with this.. So, let myVariable = 10 could be in the global scope depending upon where in the Worker/DO definition file it was located.
vmg
vmgOP5w ago
ok, it seems like they aren't being shared then in my case, i was getting the oom errors with standard workers and with testing using DOs seems to have fixed this thanks!

Did you find this page helpful?