clarity icon indicating copy to clipboard operation
clarity copied to clipboard

Memory leak issue

Open ohryk-intellias opened this issue 1 year ago • 14 comments

Hi! After adding Clarity through the GTM we faced the issue with memory leak. Seems that there are a lot of strings allocated in the memory and for some reason, it can't be cleaned up. After some time of usage of our search page we can see the following:

Screenshot 2023-06-16 at 17 09 22 Screenshot 2023-06-16 at 16 52 11

And the context in which the retained objects are stored:

Screenshot 2023-06-16 at 17 40 36

ohryk-intellias avatar Jun 16 '23 14:06 ohryk-intellias

UPD: I investigated the issue a little bit more and found the following pattern: The memory starts leaking when the /collect endpoint not calling anymore.

When you play with a ui by firing a lot of different DOM events there is a moment of time when the /collect is not sent anymore and after that, the memory leak occurs.

ohryk-intellias avatar Jun 19 '23 15:06 ohryk-intellias

Same issue. for some reason /collect calls stop and after that app memory usage just grows until Out Of Memory crash.. Can't really detect when that happens but it might be related to browser tab idling for longer time. For now we will remove clarity integration as this is affecting customers. Will monitor this issue as /clarity was helpful for us.

jsmircic avatar Jul 11 '23 10:07 jsmircic

Same here. Any updates?

guilhermebentomarques avatar Jul 11 '23 10:07 guilhermebentomarques

@ohryk-intellias , We are Clarity support.Could you please share below details to investigate the issue further.

  1. Link to page on your website having this issue.
  2. Steps to reproduce the issue.
  3. Can you please send a test account with some test data so that we can see the memory usage and debug it?

ClaritySupport avatar Jul 20 '23 13:07 ClaritySupport

We ran into this issue as well (in segment + GTM integrations)

zheller avatar Aug 30 '23 12:08 zheller

@zheller ,We are Clarity support.Could you please share below details to investigate the issue further.

Link to page on your website having this issue. Steps to reproduce the issue. Can you please send a test account with some test data so that we can see the memory usage and debug it?

ClaritySupport avatar Aug 30 '23 14:08 ClaritySupport

I hit this issue too. In my case it's happening on a page with an audio tag with src="data:audio/mpeg;base64,.... This base64 is about 100MB. Seems that /collect is sending the whole content of the tag (3 times): image image

After that, the /collect endpoint is not called anymore.

R-Pin3da avatar Mar 12 '24 16:03 R-Pin3da

IMG tags with src="data:..." causes memory leak. (img tag was created by dropzonejs, image on disk was 2.6MB)

Screenshot 2024-05-09 at 11 14 49

simkuns avatar May 09 '24 08:05 simkuns

I was able to fix/workaround the memory leak in my websites by adding img[src^="data:"] rule in Settings > Masking > Mask by element

https://learn.microsoft.com/en-us/clarity/setup-and-installation/clarity-masking#mask-by-element

simkuns avatar May 22 '24 08:05 simkuns

We are experiencing the same on our webapp, and when it crashes unfortunately this can cause data loss. I can see that excluding elements with[src^="data:"] might help, other than this are there any other updates?

Screenshot 2024-07-16 at 10 10 33

gigadie avatar Jul 16 '24 09:07 gigadie

Hi @ClaritySupport Are there any updates about this issue? We would really like to start using Clarity again, but this issue affects our customers so much that we had to abandon it :(

nsmircic avatar Jul 19 '24 10:07 nsmircic

Hi Nikola,

Could you please share website address, Clarity project ID and details on memory leakage to assist further.

Thanks, Clarity Support Team Visit our docs!: https://docs.microsoft.com/en-us/clarity @.@.> @.***

Confidentiality note: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named in the e-mail. If the reader of the e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading it is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system.

From: Nikola Smircic @.> Sent: Friday, July 19, 2024 3:31 AM To: microsoft/clarity @.> Cc: Microsoft Clarity Support @.>; Mention @.> Subject: Re: [microsoft/clarity] Memory leak issue (Issue #407)

Hi @ClaritySupporthttps://github.com/ClaritySupport Are there any updates about this issue? We would really like to start using Clarity again, but this issue affects our customers so much that we had to abandon it :(

Reply to this email directly, view it on GitHubhttps://github.com/microsoft/clarity/issues/407#issuecomment-2238863074, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AW5BXQZM3JFGFZNFDYWBEBDZNDTGXAVCNFSM6AAAAAAZJLYQESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZYHA3DGMBXGQ. You are receiving this because you were mentioned.Message ID: @.@.>>

ClaritySupport avatar Jul 19 '24 15:07 ClaritySupport

Sure @ClaritySupport We would like to get in contact with your team and assist you with providing a test environment and steps to reproduce the error. I posted about this issue on Clarity portal (Feedback/Report an issue) where you can see my contact details. I'd be more than happy to assist you in fixing this bug.

nsmircic avatar Jul 20 '24 11:07 nsmircic

Hi Nikola,

We have responded to your DSAT in our Feedback portal.

Thanks, Clarity Support Team Visit our docs!: https://docs.microsoft.com/en-us/clarity @.@.> @.***

Confidentiality note: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named in the e-mail. If the reader of the e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading it is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system.

From: Nikola Smircic @.> Sent: Saturday, July 20, 2024 4:01 AM To: microsoft/clarity @.> Cc: Microsoft Clarity Support @.>; Mention @.> Subject: Re: [microsoft/clarity] Memory leak issue (Issue #407)

Sure @ClaritySupporthttps://github.com/ClaritySupport We would like to get in contact with your team and assist you with providing a test environment and steps to reproduce the error. I posted about this issue on Clarity portal (Feedback/Report an issue) where you can see my contact details. I'd be more than happy to assist you in fixing this bug.

Reply to this email directly, view it on GitHubhttps://github.com/microsoft/clarity/issues/407#issuecomment-2241087258, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AW5BXQ4R244TUYIEMXWT2YLZNI7PJAVCNFSM6AAAAAAZJLYQESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRGA4DOMRVHA. You are receiving this because you were mentioned.Message ID: @.@.>>

ClaritySupport avatar Jul 22 '24 15:07 ClaritySupport