Open symwell opened 1 year ago
Some progress:
1) Before, we could end up with more files in pending than there were in the queue
num in pending 67
num in queue 65
Now, after changing how items are added (check if in pending when the queue item is processed, not pushed), we end up with few files in pending but queue never draining.
num in pending 2
num in queue 269
It's strange QueueObject
doesn't have a pop
.
2) Later I removed the pending
variable, still got OOM.
3) Set MaxMSBetween in EventAggregator to a high value of 10 * 1000 * 10000000
(112 days), got OOM.
4) I saw the queue go up to
num in queue 381
even though there are only 67 appmap.json files
find $HOME/src/sample_app_6th_ed/tmp/appmap/minitest | grep -i appmap.json | wc -l
67
This suggests the queue might not be having items removed from it.
5) After adding the ability to remove items from the queue, it takes some time for the queue to empty. Indexing takes a lot of time to complete, anywhere from 50ms-150ms-3500ms-37000ms per file.
queue processed /home/test/src/sample_app_6th_ed/tmp/appmap/minitest/Microposts_controller_should_redirect_destroy_for_wrong_micropost.appmap.json in 19168
queue processed /home/test/src/sample_app_6th_ed/tmp/appmap/minitest/Microposts_controller_should_redirect_destroy_when_not_logged_in.appmap.json in 37423
queue processed /home/test/src/sample_app_6th_ed/tmp/appmap/minitest/Relationships_controller_destroy_should_require_logged-in_user.appmap.json in 18835
queue processed /home/test/src/sample_app_6th_ed/tmp/appmap/minitest/Site_layout_layout_links.appmap.json in 18753
queue processed /home/test/src/sample_app_6th_ed/tmp/appmap/minitest/Following_followers_page.appmap.json in 31041
Item completion may not being reported properly.
Ask Dustin about it?
On Mon, Dec 5, 2022 at 2:51 PM symwell @.***> wrote:
Some progress
Before, we could end up with more files in pending than there were in the queue
num in pending 67 num in queue 65
Now, after changing how items are added, we end up with few files in pending but queue never draining
num in pending 2 num in queue 269
It's strange QueueObject doesn't have a pop.
— Reply to this email directly, view it on GitHub https://github.com/getappmap/appmap-js/issues/886#issuecomment-1338075710, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC62HFXFQEMTDVHRNIX3WLZBURANCNFSM6AAAAAASUSEMX4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I created a possible fix that keeps the number of items in the queue to no more than 67. It's here.
It still produces an OOM.
Perhaps the issue is some other resource leaking memory, like open file handles that don't close or something.
Items in the queue are just file names. Should not cause OOM
On Tue, Dec 6, 2022 at 12:25 PM symwell @.***> wrote:
I created a possible fix that keeps the number of items in the queue to no more than 67. It's here https://github.com/getappmap/appmap-js/compare/sw/fix_indexer_oom__version2?expand=1 .
It still produces an OOM.
— Reply to this email directly, view it on GitHub https://github.com/getappmap/appmap-js/issues/886#issuecomment-1339722303, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC6ZMBWNFO6HWUU5HGBLWL5ZJLANCNFSM6AAAAAASUSEMX4 . You are receiving this because you commented.Message ID: @.***>
The indexer crashes with an out of memory error. Also described here.
To reproduce
Also reproduced with
sleep 30
instead ofsleep 60.
kgilpin suggests