Skip to content
New issue

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

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

Already on GitHub? # to your account

Out of memorty error #1911

Open
HosseinAkhoundi opened this issue Nov 4, 2024 · 3 comments
Open

Out of memorty error #1911

HosseinAkhoundi opened this issue Nov 4, 2024 · 3 comments
Labels

Comments

@HosseinAkhoundi
Copy link

HosseinAkhoundi commented Nov 4, 2024

Hi there
I am using noVNC within my organization. Randomly, some users encounter the 'ns_ERROR_OUT_OF_MEMORY' error

I have investigated this error and have a hypothesis related to the method that retrieves data entirely. I believe this method should be optimized to fetch data in chunks instead of retrieving the entire dataset at once
at line 201 display.js in core modules
saveImg = this._drawCtx.getImageData(0, 0, canvas.width, canvas.height);

tejarat-no-vnc

  • OS: ubuntu and windows
  • Browser: firefox
  • Browser version: 132
  • noVNC version: 1.3
@CendioOssman
Copy link
Member

Thank you for your report.

Unfortunately, the memory needs to be allocated somewhere during this stage. Getting it in smaller chunks would just mean more of them. The only hope would be if other types of memory has a different limit (e.g. another canvas).

Are your users using a very large screen resolution? It would be very helpful if we can reproduce this so we can try different approaches.

@GreatAg
Copy link

GreatAg commented Nov 10, 2024

Hi, Thanks for your quick reply,

Getting it in smaller chunks would just mean more of them

Why you say that getting in smaller chunks consume more memory?
Instead i load all the data once into memory i load it chunk by chunk into memory.

Are your users using a very large screen resolution

different users have different resolutions and i cant tell you exact resolution that problem happens.
Also i open vnc.html in an iframe in my application, does it matter?

Thanks again for your help

@CendioOssman
Copy link
Member

Why you say that getting in smaller chunks consume more memory?
Instead i load all the data once into memory i load it chunk by chunk into memory.

We need to keep the entire image in memory, so it will still be the same total any way we slice it.

Also i open vnc.html in an iframe in my application, does it matter?

That could be an issue. The browser might be more restrictive in that case.
Could you see if the issue goes away without an iframe?

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

No branches or pull requests

3 participants