Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree_path attribute can grow enormously #12

Open
hwo411 opened this issue Jan 23, 2020 · 0 comments
Open

tree_path attribute can grow enormously #12

hwo411 opened this issue Jan 23, 2020 · 0 comments

Comments

@hwo411
Copy link

hwo411 commented Jan 23, 2020

Hi everyone.

Recently on our project, we ran into a fairly rare bug, which leads to livelock. Our sidekiq jobs for one of the users started calling each other without doing anything useful. This caused a lot of problems in the place we didn't expect - logs. It had generated more than 60GB of logs by the time we discovered the issue. request_depth was more than 167k.

While fixing the causes of such behavior is unquestionably important, I think such vulnerability should also be fixed in the gem. My thoughts on it - one will never need more than 30-50 first and last items of tree_path. It's important how things had begun and how they ended. In the middle, it'll most likely be a loop, and it can always be investigated through the other log entries with the same request_id and some lower request_depth.

So I'd suggest to separate tree_path to tree_root and tree_node parameters and introduce a config value for setting max length for each of the fields.

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

No branches or pull requests

1 participant