Post by ForYouPublishing » Thu Dec 09, 2021 4:36 pm

Hello! We are experiencing some website speed problems on OpenCart 3.0.3.2 in the customer login zone and on the checkout page. The problem is that the server can not handle the resource consumption generated by the platform and remains constantly without RAM memory.

The site is hosted alone on a 2 CPU server (plus 1 CPU addon), 2 GB RAM, 60 GB SSD.

We have a daily average of 200 visitors on the website and 400 active products (only books).

We had installed OpenCart Lightning module. Now we installed LiteSpeed module and after that, the speed improved a little. The waiting time to the checkout page or login is 5 - 7 seconds, but we have a lot of customers that can not complete these steps and complete the order.

We have had this problem for nearly 2 weeks. Before that the speed was good. Also, we did not do any changes to the platform in the previous period.

It is possible the platform is not well optimized and this is why it consumes a lot of resources? Or what can be the problem?

Thank you!


Posts

Joined
Thu Dec 09, 2021 4:25 pm

Post by by mona » Thu Dec 09, 2021 8:26 pm

The problem is that the server can not handle the resource consumption generated by the platform and remains constantly without RAM memory.
What are you basing this conclusion on?

We have a daily average of 200 visitors on the website and 400 active products (only books).
You could run that on a Raspberry Pi.

We had installed OpenCart Lightning module. Now we installed LiteSpeed module and after that, the speed improved a little.
Get rid of those, useless (certainly with just 200 visitors) and consumes even more memory.

Also, we did not do any changes to the platform in the previous period.
Perhaps your host did?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by ForYouPublishing » Thu Dec 09, 2021 8:58 pm

Thank you so much for your answer!

The hosting service monitored the logs and they said the server remains constantly without RAM memory because of the platform resource consumption.

The server thinks that the problem will solve if we upgrade our RAM memory with 4 GB and 4 CORE CPU and after that, they want to upgrade the LiteSpeed module too.


Posts

Joined
Thu Dec 09, 2021 4:25 pm

Post by paulfeakins » Thu Dec 09, 2021 11:06 pm

ForYouPublishing wrote:
Thu Dec 09, 2021 4:36 pm
It is possible the platform is not well optimized and this is why it consumes a lot of resources? Or what can be the problem?
Probably log files or database tables growing too large.

There's a list of common causes of speed issues here: https://www.antropy.co.uk/blog/how-to-s ... ed-issues/

Or we could do a technical audit of your site: https://www.antropy.co.uk/pricing/#webs ... -technical

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by EvolveWebHosting » Fri Dec 10, 2021 12:40 am

ForYouPublishing wrote:
Thu Dec 09, 2021 4:36 pm
Hello! We are experiencing some website speed problems on OpenCart 3.0.3.2 in the customer login zone and on the checkout page. The problem is that the server can not handle the resource consumption generated by the platform and remains constantly without RAM memory.

The site is hosted alone on a 2 CPU server (plus 1 CPU addon), 2 GB RAM, 60 GB SSD.

We have a daily average of 200 visitors on the website and 400 active products (only books).

We had installed OpenCart Lightning module. Now we installed LiteSpeed module and after that, the speed improved a little. The waiting time to the checkout page or login is 5 - 7 seconds, but we have a lot of customers that can not complete these steps and complete the order.

We have had this problem for nearly 2 weeks. Before that the speed was good. Also, we did not do any changes to the platform in the previous period.

It is possible the platform is not well optimized and this is why it consumes a lot of resources? Or what can be the problem?

Thank you!
I agree that 200 visitors is not much at all and that alone, especially with LiteSpeed won't cause a slow down in load times. One or more of your extensions are causing the issue here or possibly custom coding if you have any added to your site. The best way to track it down is to disable all extensions and re enable one by one and test each to find the culprit.

2 Week FREE Trial of our Shared Hosting plans (DIrectAdmin or cPanel) for new customers
2 Week FREE Trial of Astra Firewall and Malware Scanner
Visit our website for full details and to start your trial today - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by mikeinterserv » Fri Dec 10, 2021 1:34 am

ForYouPublishing wrote:
Thu Dec 09, 2021 4:36 pm
but we have a lot of customers that can not complete these steps and complete the order.
Why what happens - are they just fed up of waiting 5-7 seconds.
Can you give us a url

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by EvolveWebHosting » Fri Dec 10, 2021 10:24 am

mikeinterserv wrote:
Fri Dec 10, 2021 1:34 am
ForYouPublishing wrote:
Thu Dec 09, 2021 4:36 pm
but we have a lot of customers that can not complete these steps and complete the order.
Why what happens - are they just fed up of waiting 5-7 seconds.
Can you give us a url
6-7 seconds is not acceptable and that's probably over desktop / laptop

Definitely need a URL to help debug further

2 Week FREE Trial of our Shared Hosting plans (DIrectAdmin or cPanel) for new customers
2 Week FREE Trial of Astra Firewall and Malware Scanner
Visit our website for full details and to start your trial today - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by by mona » Fri Dec 10, 2021 7:58 pm

Paul provided some useful general notes. Of course you could be using a dreadful theme that eats through resources ?

First you need to determine how it got slow.

1) did it get slower and slower over time?
Then it is most likely oversized log files or database tables.
(check if you have VQmod, check your error logs and your session table)

2) does the slowdown just happen incidentally, i.e. not on every single page?
This could be caused by the system resizing images which tend to hold up the response.
Or by the sending of emails if it happens when creating an account or checking out.

3) did the slowdown happen all at once?
Then it is an most likely an extension you installed or your host has done some changes.

OC page generation generally do not take much RAM, only when big images are to be resized does the memory consumption sometimes become an issue.
Then again, building of huge arrays and poor coding with endless loops still happen.

you could always add this function to your index.php

Code: Select all

function print_mem() {
	$mem_alloc = memory_get_usage(true); // allocated memory by php for this script (memory is allocated in chunks)
	$mem_usage = memory_get_usage(false); // real memory usage by the script at this time, some memory is released during the script
	$mem_peak = memory_get_peak_usage(false); // highest memory used by this script
	error_log($_SERVER['REQUEST_URI'].' Memory allocated: ' . round($mem_alloc / 1024) . 'KB.');
	error_log($_SERVER['REQUEST_URI'].' Memory usage: ' . round($mem_usage / 1024) . 'KB.');
	error_log($_SERVER['REQUEST_URI'].' Peak usage: ' . round($mem_peak / 1024) . 'KB.');
}
and add at the very end of index.php:

Code: Select all

print_mem();
Then you can see the urls and this data in your php error log.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: Amazon [Bot], nonnedelectari and 255 guests