Joseph Crawford
Deno Memory Usage Increases, Does Not Decrease.
@frigjord unfortunately I have not yet. My boss has time-boxed that task as we just threw more instances at the service in aws and for the time being it has slowed the issue but not solved it. I would love to get back to this and maybe once we are through this crunch I will be able to. If you find anything related to ioredis I would be highly interested in your findings.
40 replies
Deno Memory Usage Increases, Does Not Decrease.
yea I am just a bit concerned with enabling the debugger on production but will speak to my boss about it. I am also going to see if there is a way I could write a script possibly on a lower environment to simulate a ton of traffic to the service and maybe run the debugger there and see if I can replicate the issue.
40 replies
Deno Memory Usage Increases, Does Not Decrease.
the clients can also send a pusher message through our api which will just add the message to a redis queue, another container which runs the queue consumer will process these messages and send them out through pusher for clients to receive. The consumer being a seperate service does not seem to suffer from this memory issue at all.
40 replies
Deno Memory Usage Increases, Does Not Decrease.
Sure, we are using Deno 1.46.3 in production, the app is quite simple it is running an api server which uses Oak for the routing. The application will check redis with every request to authenticate the bearer token and then will simply either add a channel (or increment the value) for a channel name, it will also on another endpoint remove or decrement the value of a key. during the subscription process it will authroize with the pusher js library and return the value of that from the server to the pusher client library.
40 replies
Deno Memory Usage Increases, Does Not Decrease.
yea I thought about this as well, however, if the container is crashing it would cause me to believe that the memory is needed but has not been released. I am pretty sure the containers are crashing since they are being taken down by auto scaling, if they were not then it would simply spin up another instance wait until it leveled out and take down the extra instance. What we are seeing everytime is that memory hits the peak, then a new conainer is brought up and then the one that was high in memory usage is taken down.
I am not sure how to check chrome dev tools since that would entail having to have debugging enabled and this seems to only happen in production under heavy load. It is not happening in our sandbox or staging environments.
40 replies
Deno Memory Usage Increases, Does Not Decrease.
Yea I was thinking the same thing, this is why I came to ask if there were any tools for Deno that may shed some light on where this may be coming from. We are using Oak so I assumed that when the controllers were completed the GC would clean up this stuff but looking through the code I do not see any blatant areas in which a memory leak would be caused. The controllers are quite simple the subscribe endpoint will reach out to an api to get some data, determine if the user can subscribe to a channel and then adds a channel to redis. The unsubscribe endpoint will reach out to redis and remove a channel, the authorize channel simply reaches out to pusher to authorize the subscription.
It would be nice if there was a tool that I am unaware of that may allow me to trace the executions to a file for inspection to determine where this leak may be coming from.
40 replies