Jump to content



Member Since 13 Nov 2018
Offline Last Active Nov 27 2019 02:09 PM

Topics I've Started

Installation Playbook Fails

18 November 2019 - 12:25 PM

Following this documentation:  https://docs.cs-cart..._playbooks.html
which i have in the past, it no longer works.   The last step, "Run a playbook" fails when enabling FPM.
Not sure what has changed but it no longer seems to work and this is really impacting my ability to get CS-Cart installed and running.
I am installing in AWS, on an Ubuntu 16.04LTS platform -- brand new, just spun up with nothing else installed.   Getting the following error:
TASK [php7/fpm : enabling FPM configuration] ******************************************************************************************
fatal: []: FAILED! => {"msg": "The conditional check '(ansible_os_family == \"Debian\") and (php_result|changed)' failed. The error was: template error while templating string: no filter named 'changed'. String: {% if (ansible_os_family == \"Debian\") and (php_result|changed) %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/ubuntu/playbooks/roles/php7/fpm/tasks/main.yml': line 37, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: enabling FPM configuration\n  ^ here\n"}

Admin Logs - Lock_Keys Lot Of Duplicates

26 April 2019 - 06:19 PM

Looking at our Admin Logs, we have so many issues with the Duplicate entry when doing an insert in to the lock_keys table.    Our system is pretty heavily loaded and this really only seems to appear during high concurrency.


Problem is, it is completely cluttering up the log to the point where we do miss the occasional important item.


Looking into this, on solution I have seen (really the only one i could find anywhere) was to wrap the try-catch with an if key exists check and if it did, just putOffExpiration.   Trying this it didn't really help.


What did help was using that if key exists check in conjunction with changing the INSERT to a REPLACE.

// FROM  
   'INSERT INTO ?:lock_keys (key_id, token, expiry_at) VALUES (?s, ?s, UNIX_TIMESTAMP(NOW()) + ?i)',
   'REPLACE INTO ?:lock_keys (key_id, token, expiry_at) VALUES (?s, ?s, UNIX_TIMESTAMP(NOW()) + ?i)',

What i cannot find is any information related to the DatabaseStore.php file and what the impact of doing this will be.


I do know that REPLACE is slower than INSERT.   However, using Exception Handling to catch something that can be handled with the above seems like a better option.    I just don't know or can find what the purpose or issues I may face could be.


Anyone else seeing this or have suggestions or info?

Bad Query On Admin Page

11 February 2019 - 07:15 PM

We now have about 2 Million products on our site and i the load time for the Admin UI is taking longer and longer.   After looking at what was going on, the query below was showing up.   The issue here is this is actually the WRONG way to get a "Count" of products.


What is happening is the database is marshalling up the requested  "1"  since that is all that is being requested.   Problem::  It is getting back almost 2 Million of these !


This isn't too bad on a small system but the reality is the query is just flat out the wrong way to go after the number of products in the system.


Anyone else seeing this problem or the need to fix this query in the core application?

SELECT SQL_CALC_FOUND_ROWS 1 FROM cscart_products AS products 
LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id 
	AND descr1.lang_code = 'en'  
LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id 
	AND prices.lower_limit = 1 
LEFT JOIN cscart_companies AS companies ON companies.company_id = products.company_id  
INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id 
INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id   
WHERE 1  AND products.product_id NOT IN (183291, 183292, 183293, 183294, 0) 
AND products.status IN ('A') AND prices.usergroup_id IN (0) 
AND products.product_type IN ('P', 'C') 
GROUP BY products.product_id

Multi-Vendor - Common Products For Vendors Performance

30 November 2018 - 12:49 AM

We are using Version 4.9.1 of Multi-Vendor, and have 80 vendors, with 30,000 total products.

When we enable "Common Products for Vendors[Beta]" addon that comes with the platform we notice an immediate 5x to 10x performance degradation at the user interface as we do a variety of things like switching between categories or trying to open any vendor's store. If we disable the addon, the performance returns to normal.


Has anyone else noticed a performance hit with this?   Is there a fix or something we can do to address this?


We are working with a 12 Core, 32GB dedicated host.    Our concern is we are getting ready to add about 1M products and we are already having issues.