Catalog pages: high memory consumption and slow load speed

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!
sols
Posts: 6
Joined: 19 Nov 2020, 08:22

Catalog pages: high memory consumption and slow load speed

Post by sols » 19 Nov 2020, 08:36

Hi.
The product category page, even if there are no products in it, loads very slowly and uses a lot of memory.

route: /{f_name}~{f_catid}
memory: 47MB
time: 2.5s

total products in the shop: 10500

How i can speed up the loading of category pages?
And how i can view mysql queries of aimeos package?

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

Re: Catalog pages: high memory consumption and slow load speed

Post by aimeos » 19 Nov 2020, 08:46

Sounds like PHP XDebug is enabled in your installation
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sols
Posts: 6
Joined: 19 Nov 2020, 08:22

Re: Catalog pages: high memory consumption and slow load speed

Post by sols » 19 Nov 2020, 09:24

Thank you for quick answer.
XDebug exists, but it disabled.

For example is product page:
route: /{d_name}/{d_pos?}/{d_prodid?}
memory: 11MB, time: 526ms. It is fast.

Ie problem with catalog pages
On the production server, the speed is also slow. What could be the reason?

Aimeos: 2020.07
PHP: 7.3

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

Re: Catalog pages: high memory consumption and slow load speed

Post by aimeos » 19 Nov 2020, 09:29

Even your detail page isn't really fast and XDebug even consumes resources if it's disabled. Thus, you should deinstall XDebug completely from your production environment.

Then, check the Aimeos Log panel in the admin backend if there are slow queries logged. Also check, if you've disabled caching for Aimeos in the TYPO3 Settings panel (cache driver must be "TYPO3", not "None")
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sols
Posts: 6
Joined: 19 Nov 2020, 08:22

Re: Catalog pages: high memory consumption and slow load speed

Post by sols » 19 Nov 2020, 09:38

Im using Laravel 7
config/shop.php has:

Code: Select all

'resource' => [
        'cache' => [
            'redis' => [
                'scheme' => 'tcp',
                'host' => '127.0.0.1',
                'port' => 6379,
            ]
        ]
    ],
    
    ....
    
    'madmin' => [
		'cache' => [
			'manager' => [
				'name' => 'redis', // Disable caching for development
			],
		],
installed:
"aimeos/ai-cache": "^2020.07"
"predis/predis": "^1.1"

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

Re: Catalog pages: high memory consumption and slow load speed

Post by aimeos » 19 Nov 2020, 09:45

Can you post your ./config/shop.php (without username/password credentials)?
What happens if you disable Redis caching and use standard DB caching instead?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sols
Posts: 6
Joined: 19 Nov 2020, 08:22

Re: Catalog pages: high memory consumption and slow load speed

Post by sols » 19 Nov 2020, 11:07

Nothing happens.
Even after installing aimeos/ai-cache and predis, nothing has changed.
The file is attached.
Attachments
shop.php.zip
(1.8 KiB) Downloaded 90 times

sols
Posts: 6
Joined: 19 Nov 2020, 08:22

Re: Catalog pages: high memory consumption and slow load speed

Post by sols » 19 Nov 2020, 13:21

And attached madmin_log of category page: opening and reloading some category page.
Most likely the cache is not working
Attachments
madmin_log_2020-11-19 2.sql.zip
(70.2 KiB) Downloaded 85 times

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

Re: Catalog pages: high memory consumption and slow load speed

Post by aimeos » 19 Nov 2020, 17:14

Queries are fast, the DB seems to be not your problem.
Did you deinstall XDebug?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sols
Posts: 6
Joined: 19 Nov 2020, 08:22

Re: Catalog pages: high memory consumption and slow load speed

Post by sols » 19 Nov 2020, 20:17

Yes, I will try to remove xdebug.
But the same problem in production, where xdebug not installed, pages load even slower.

Do you can check my config/shop.php? It seems to me that caching does not work, because when I change the ip address in a redis to a non-existent one, the error does not appear.

Post Reply