Site becomes very slow

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Harpal Singh
Posts: 28
Joined: 21 May 2019, 09:52

Site becomes very slow

Post by Harpal Singh » 26 Jun 2019, 10:35

Hi,

My site has become very slow. It takes a longer time than expected to load a single page. It happens randomly, sometimes it takes 30-40 seconds to load the page and sometimes the same page loads in 5-7 seconds. What would be the reason for this and how to fix?

Is this issue related to my older issue which was too many connections issue?

Thanks
Harpal Singh

User avatar
aimeos
Administrator
Posts: 7882
Joined: 01 Jan 1970, 00:00

Re: Site becomes very slow

Post by aimeos » 26 Jun 2019, 10:39

Maybe, Aimeos usually responds in 100ms. Does your madmin_log table contains a lot of entries regarding slow queries?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Harpal Singh
Posts: 28
Joined: 21 May 2019, 09:52

Re: Site becomes very slow

Post by Harpal Singh » 26 Jun 2019, 13:37

aimeos wrote:Maybe, Aimeos usually responds in 100ms. Does your madmin_log table contains a lot of entries regarding slow queries?
Hmmm....
No there is nothing like any slow query exception in madmin_log.

User avatar
aimeos
Administrator
Posts: 7882
Joined: 01 Jan 1970, 00:00

Re: Site becomes very slow

Post by aimeos » 27 Jun 2019, 09:15

Then your problem is somewhere else, maybe a misconfiguration of PHP or the web server. Problems you should definitively have a look at because they cause a huge slowdown:
- XDebug enabled
- Files stored on a network file system
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

damponting
Posts: 1
Joined: 02 Jul 2019, 05:32

Re: Site becomes very slow

Post by damponting » 02 Jul 2019, 05:54

Hi,

Kindly find below the reasons cause website slow :

- Check your folder size on the server It shouldn't be more than 1.5MB.
- Check and optimize all the images and videos.
- Check JavaScript, Is that Delaying in Page Loading?
- Use CDN files.
- If you're using WordPress, too many plugins can also slow down page speed.
- Lastly, check with your hosting provider.

I hope my answer will help you!!

Harpal Singh
Posts: 28
Joined: 21 May 2019, 09:52

Re: Site becomes very slow

Post by Harpal Singh » 02 Jul 2019, 07:10

damponting wrote:Hi,

Kindly find below the reasons cause website slow :

- Check your folder size on the server It shouldn't be more than 1.5MB.
- Check and optimize all the images and videos.
- Check JavaScript, Is that Delaying in Page Loading?
- Use CDN files.
- If you're using WordPress, too many plugins can also slow down page speed.
- Lastly, check with your hosting provider.

I hope my answer will help you!!
Thanks for your help.

I have also optimized the mysql queries and its working faster than before.

Code: Select all

function getBasketMini(){
    $config = app( '\Aimeos\Shop\Base\Context' )->get()->getConfig();
    $config->set( 'client/html/catalog/filter/standard/subparts', ['locale/currency'] );
    return $params = app( 'Aimeos\Shop\Base\Page' )->getSections( 'mini-cart' );
}
I was using the above function to get minicart html from Helper.php and only this single function executes 50+ queries for a single request.
Is there any another way to get minicart html without firing number of queries.

Thanks

User avatar
aimeos
Administrator
Posts: 7882
Joined: 01 Jan 1970, 00:00

Re: Site becomes very slow

Post by aimeos » 02 Jul 2019, 08:56

The problem is that you fetch the small basket 50+ times instead of only once for some reason because retrieving the small basket itself is done by asking the Laravel session for the data. Maybe there are more queries related to Laravel authentication, etc.

What queries are sent to the database server multiple times?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply