Jump to content



Member Since 13 Nov 2018
Offline Last Active May 15 2019 09:16 PM

Topics I've Started

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.



Playbook Install And File/folder Permissions

14 November 2018 - 07:14 PM

I am having an issue chasing down the exact file/folder, owner permissions.   Everything i can find only discusses the few files in the root folder and their "permission".


I have created a AWS instance running Ubuntu 16.04.

I ssh to the box (so I am the "ubuntu" user).

I follow the instructions on the Playbook install: How To: Configure the Environment for CS-Cart/Multi-Vendor right from the cs-cart help docs.   This installation works perfectly, i can copy paste the commands in and run.


I then uploaded the multivendor_v4.9.1.zip and extract it in the directory defined when I edited the main.json file while following the instructions.   For this discussion, assume the site is installed at 



I then open the website and finish the install, adding in the demo data.   Everything works, site comes up, is accessible, etc.


Now is where the issue begins:

I attempt to use the Admin panel to Add an Add-on.   I get the "The following directories do not have write permission:  (essentially the app/addon and others).


I have also had he issue where various help/forums say to rename the /var/cache folder.   Unfortunately this is also an issue as the cache files reside in the  /var/cache/nginx folder.



So, looking at the /var/www/html/example.com folder, the owner group is root root and this goes for all the files and folders below.


php7 and nginx are running as root


ALL of the ownership settings were done by the Playbook install.


So, is there something wrong with the way the Playbook installs?   What should the owner:group be set to in order to enable the Add On addition to actually work?









Administor Does Not Receive Any Notifications

13 November 2018 - 10:03 PM

The Administrator is not receiving any email notifications/alerts.   

I have SMTP configured and it sends test messages, user registration messages etc, just NOTHING to the administrator.


To test things, I have downloaded and installed the Multi-Vendor version of the cart.   I started with a fresh install on Ubuntu using the playbooks.   I then connected to the site as a "user" and Registered.   As that user I received the Welcome email but the Administrator did Not receive the Notification that a new account was created.

For the test installation i just left everything as the default -- using php email etc.


I have checked all the logs, using the Test email button on the Email Templates works, just no emails to the Administrator.   I have also verified the notifications were not going into the Junk folder.