Giter VIP home page Giter VIP logo

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /home/(username)/public_html/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Indexer/Abstract.php on line 357 about groupscatalog2 HOT 14 CLOSED

vinai avatar vinai commented on June 12, 2024
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /home/(username)/public_html/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Indexer/Abstract.php on line 357

from groupscatalog2.

Comments (14)

Vinai avatar Vinai commented on June 12, 2024

256MB should be enough. How many Products, Customer Groups and Store Views do you have?

from groupscatalog2.

alaldin avatar alaldin commented on June 12, 2024

We only have one store view with 152077 products & 4 customer groups.

I changed the php memory to 1gb on the server but we still get the same error ☺.

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

Please try the following and post the results:

  • Open the file app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Indexer/Abstract.php
    The file contains the class Netzarbeiter_GroupsCatalog2_Model_Resource_Indexer_Abstract
  • Find the line 28 containing the code
    const INSERT_CHUNK_SIZE = 1000;
  • Change the value from 1000 to 100
  • Save the file, and try to reindex again

This should significantly reduce the memory footprint enabling you to run the indexer, even though it will mean a slower index process for smaller catalog instances. If this does indeed resolve the issue for you I'll make it a configurable value.

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

Can you provide feedback if changing the chunk size resolves the issue?

from groupscatalog2.

alaldin avatar alaldin commented on June 12, 2024

I haven’t had the chance to make the changes to provide the feedback, I am back in the office today and hopefully I will be able to send some back to you today.

from groupscatalog2.

alaldin avatar alaldin commented on June 12, 2024

Hi Vinai

Sorry I could not get back to you sooner, we had development being carried out and did not want to do anything till it was done.

I did what you said and it did not work but I got the below error.

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /home/comamari/public_html/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Indexer/Abstract.php on line 357

Sorry I could not get back to you sooner, we had development being carried out and did not want to do anything till it was done.

Please advise....

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

I am currently refactoring the indexing process. Can't give you an ETA at the moment, but I hope to work on it for a few hours over the weekend.

from groupscatalog2.

alaldin avatar alaldin commented on June 12, 2024

Brilliant thanks Vinai, it would be good to get this working...

from groupscatalog2.

alaldin avatar alaldin commented on June 12, 2024

Hi Vinai

Any luck with the below?

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

Sorry, still a work in progress.
This week I'll won't manage to put in any time though, too much right now.

from groupscatalog2.

alaldin avatar alaldin commented on June 12, 2024

Ok when done please let me know what to do and I will install the ext again.

from groupscatalog2.

alaldin avatar alaldin commented on June 12, 2024

Hi Vinai

Any luck with the above?

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

Hi,

I've pushed a new version of app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Indexer/Abstract.php to the master branch.
In effect, the class now iterates over a query cursor instead of a full result set.

Please see 017d395 for details, if you only want to apply the changes to the single class.
If possible, can you please check if this makes any difference for you?

If you need more information to apply the change in your codebase, please let me know. Thanks!

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

No further feedback from original poster, assuming fixed and closing this issue.

from groupscatalog2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.