Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 04-30-2024 11:03:04

Registered: 04-29-2024
Posts: 77

Website Slow When Active Users are Logged On

NOTE: This post was created on 2023-11-17 on the Kryptronic eCommerce Community facebook page, which has been replaced with this forum.  All facebook support content was migrated into this forum in April 2024.


Hi Nick
Any tips of where I can look to resolve an issue I currently have.
Website has started running slow, but it only runs slow when a user is logged in. Without anyone logged in, website runs as expected but as soon as any user logs in or a new account account is created, it slows right down.
I have tried different browsers, devices and networks but it always the same. Frontend and backend are the same.
No files have been changed since the problem occured.
I have checked database and there isn't anything that stands out.
There are 70000 user accounts and 100,000 sessions but they have always been similar sizes.
Any idea what I can check?


Interesting. The number of user accounts and sessions shouldn't impact site speed - especially at those levels, which are normal for a fairly busy site. The session logic is tuned to keep that table size down to under 250k entries even on the busiest sites. All the session and user logic is relatively new and was coded in a highly optimized fashion when we converted from user tracking with sids to token-based sessions. It is pretty much as fast as it can be from a code perspective, and certainly faster than it ever was. So I'm not thinking this is related to anything wrong logically with the software or your data, which is well within range.


I keep forgetting enter is a submit here... The first thing I'd do is step back and make sure you've really identified the issue. Is your shopping cart table extremely huge and that's impacting page load times when you're logging in as a user with a shopping cart?

Additionally, we add indexes on certain db tables here on busier sites. These two will help with speed if you haven't set them up:

ALTER TABLE ecom_cart ADD INDEX cartid (cartid)

ALTER TABLE core_users ADD INDEX ktokenuser (ktokenuser)

If you want the full list of indexes we use here, please ping me via our ticket system. You'd be amazed at how fast things can run on the catalog side with a few indexes added.


Thanks Nick. Those two indexes do appear to have helped. Still not quick as not logged in, but now same process is 432ms compared to around 750ms prior to adding them. Without being logged in, same process is around 336ms.


My cart table is small, only around 5000 - 10000 rows as it only stores for 7 days specifically to prevent overload issues I had years ago. I will sent you message through system for the other indexes.


Thanks for the extra SQL statements. Everything seems back to normal this morning so either the statements worked or the host was carrying out maintenance or something. It was definitely the database causing the issue as had same issue on test site if I connected it to my live database. No issue on test site when connected to much smaller test database.


Sounds like an overloaded database server more than anything. Perhaps it needed a restart. Glad to hear you're good to go now.



Board footer