Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

Memory leak on recursive unresolved promises. #39

Open
Istar-Eldritch opened this issue Sep 17, 2017 · 0 comments
Open

Memory leak on recursive unresolved promises. #39

Istar-Eldritch opened this issue Sep 17, 2017 · 0 comments

Comments

@Istar-Eldritch
Copy link
Contributor

Istar-Eldritch commented Sep 17, 2017

We use recursive promises in a couple places in the amqp backend. (setup and register functions). We should check if we have to trampoline them.

From the top of my head Iris only uses this recursion to keep the connection alive, thou only increasing the stack on connection loss. This means that the memory leaked in iris is negligible as the number of times the connection needs to drop for this to be noticeable it's likely to be never reached. (2-3Mb every 10k recursive calls)

Background and relevant links:
This problem was spotted while writing a new data transfer tool that was using recursive pagination to call the database using promises over Iris. The main issue was not in iris but the recursive call itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant