Community Store Add-on consuming massive amounts of memory and timing out

Permalink 1 user found helpful
I just installed a clean V8 site with Long Story Short theme and the Community Store Add-on. It was giving me a memory error so I increased the Memory allocation in the php.ini file from 256MB to 1000MB. That cleared the memory exhausted error and I was able to create my first test product. i then created a couple categories and when I attempt to Edit the product, it times out or just spins on the edit page and I can't update/edit anything. The host is Hostmonster, so that is obviously the first issue, but the rest of the site runs just fine. It's this Add-on that is eating up massive amounts of server memory for some reason and I don't want to abandon it if I don't have to.

barkingtuna
 
barkingtuna replied on at Permalink Reply
barkingtuna
I saw a thread on Github about this issue being related to production options. I have a bunch... as I am developing a site for a custom cowboy boot company and there are sizing options for men and women as well as widths.
mesuva replied on at Permalink Reply
mesuva
What this could be is the situation where you have a whole bunch of product options with lots of different values, _and_ each option is set with the option 'In Variations - Yes'.

With this setup, just say you have 10 values for the first option, 5 for the next and 10 for a third, you end up with the system trying to handle 10x5x10 variations, so 500 variation options. This generally isn't wanted, you'd just pick one of the options to be in variations, or a few and keep the numbers down.

Until two days ago, this 'In Variations' option for product options was in a branch and not in the master and a release - in those cases the options were _always_ added to variation combinations, resulting in some cases where it multiplied them and made things explode.

With the 1.2 release you should see those options - with the product you are adding/editing, make sure you check those.

Further to that, I have a pull request soon to be merged that aims to make the saving more efficient. Critically though I've put in a limit to the number of variations (50) so that you can't lock up a product. You might want to try just adding in this little bit of code here and seeing if that helps:
https://github.com/concrete5-community-store/community_store/pull/25...

If it's nothing to do with product variation combinations I can't really suggest what else it would be, I've not encountered any other timeouts myself apart from that situation.
barkingtuna replied on at Permalink Reply
barkingtuna
I appreciate the thorough response... I've installed 1.2 and it solved it. It most definitely was related variations.
mesuva replied on at Permalink Reply
mesuva
Excellent to hear, cheers.