microsoft / BotFramework-Composer

Dialog creation and management for Microsoft Bot Framework Applications
https://docs.microsoft.com/en-us/composer/
MIT License
869 stars 372 forks source link

Bot frmaework Composer freezes very frequently - Out of memory exception. Both Web & Windows Version #9346

Closed selvaduraiece closed 7 months ago

selvaduraiece commented 2 years ago

Describe the bug

Bot frmaework Composer freezes very frequently - Out of memory exception. Both Web & Windows Version

image

Version

2.0

Browser

All

OS

Windows

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

image

Additional context

InfinytRam commented 2 years ago

Hi @selvaduraiece,

I see you are using composer version 2.0. Does this same behavior happen if using the latest Composer version 2.1.2?

selvaduraiece commented 2 years ago

I did updated and used for 2 days and it still remanins same

selvaduraiece commented 2 years ago

Extremely slow and taking more than 10min to add a simple SendResponse

dmvtech commented 2 years ago

Linking to another issue with Composer and memory leak/Out of Memory which might be related or of help: https://github.com/microsoft/BotFramework-Composer/issues/4728

stevkan commented 2 years ago

Linking IcM #335151352, "High memory utilization by Bot framework composer", to issue. Cx is unable to move forward on project due to memory issue.

sw-joelmut commented 2 years ago

Hi @tracyboehrer, we've been wondering if you can provide us with this information that could help us. Thanks.

Linking IcM #335151352, "High memory utilization by Bot framework composer", to issue. Cx is unable to move forward on project due to memory issue.

stevkan commented 2 years ago

@ceciliaavila, could you provide an update to on this?

ceciliaavila commented 2 years ago

Hi @stevkan, we are working on this issue, trying to identify the reproduction steps. We'll let you know as soon as we have more information.

sw-joelmut commented 2 years ago

We were able to reproduce the issue consistently by creating a sample with multiple actions, opening and closing the Composer canvas with other pages, and lowering the JS heap memory size limit (so it's easier to reproduce the error). Moreover, we noticed each time the canvas page is closed the memory used is never released, causing to increment the memory usage over time.

A possible workaround, while we work on a solution, could be increasing the JS heap memory size limit by adding the --js-flags="--max_old_space_size=8192" (8 GB) argument when either Chrome (web) or Composer (desktop) are executed (more information on how to add arguments to a shortcut).

Note: starting from Electron 21 (Composer uses the version 14) and Chrome 103 versions, the JS heap memory is limited to 4 GB (more information).

Image showing how the memory behaves when closing and opening the Composer canvas. image

stevkan commented 2 years ago

@sw-joelmut, @ceciliaavila - Thank you for the update. I will forward your suggested workaround to the IcM customer as a possible mitigating step until a proper fix is (hopefully) made available.

I'll provide an update if there are any questions/concerns from the customer regarding this.

tdurnford commented 1 year ago

@ceciliaavila Do you have any updates on this?

sw-joelmut commented 1 year ago

Hi @tdurnford. We created the PR #9418 that fixes one of the issues with the memory leak, reducing a bit the memory usage. We'll continue reviewing other possible improvements, as the problem is not completely solved yet.

tracyboehrer commented 7 months ago

The latest Composer nightly can be used until the 2.1.3 version is released.