Is there a way to solve the 'out of memory' error?

Is there a way to solve the 'out of memory' error?

solsol Posts: 18Questions: 7Answers: 0

Hi, all.

I have a problem with out of memory, and I am wondering what way there will be in my development environment.

First, I should use scroll X and scroll Y. So, I cannot set paging-option false.
Second, I'm using ajax data. Data length is over 4,000. (over 100MB)

Is there a way to handle this error in this situation?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    That's not many records, so that shouldn't be a problem. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Colin

  • solsol Posts: 18Questions: 7Answers: 0
    edited December 2023

    Hi, colin!

    I'm not able to link my page.. so I made the test case.

    but..

    actually, this is all.. (And I wrote question wrong.. I mean '** So, I can't set paging-option true' )

    I searched Forums(I read question1 and question2 ), and I found the way to use 'serverSide' rendering and 'deferRender' options.

    If not using pagination, are these the only way to fix this error?
    I want to limit the using memory, is this available?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    It works fine here, so there must be something else going on with your config. A few questions might help understand what's happening. What makes you think it's DataTables that's causing the memory issues? Have you tried a default config (with those three options commented out)?

    Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Colin

  • solsol Posts: 18Questions: 7Answers: 0

    Colin, thanks for your comment.
    I edited your test page, here
    And I don't know the exact situation, but out of memory also appeared once on this page when I edit the code.

    1. I thought the DataTables caused an out of memory error because the only part on my page that receives and outputs data with ajax.
    2. I haven't tried a default config, because my page doesn't use the paging option. And it doesn't get 'out of memory' every time, it does sometimes. And I thought that paging would reduce the number of prints I had to print, so I wouldn't get an out of memory error. So, I just wanted to find a way to solve it in this environment that I'm not going to use the paging option.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Enable deferRender and paging which will help reduce memory usage in your example there. You are displaying all of the table cells at once, so it is going to be slow and maximally memory intensive for that data.

    If you are getting a memory error with that example (I'm not, but I don't know what host computer you are using; RAM, browser, etc) then it suggests to me that your computer doesn't have a huge amount of RAM. There is no memory leak on that page.

    Allan

Sign In or Register to comment.