Can not create new Mass Action or open existing ( backend)

  • Posts: 4
  • Thank you received: 0
6 months 5 days ago #356116

-- HikaShop version -- : 5.0.0
-- Joomla version -- : 4.3.4
-- PHP version -- : 8.0.0
-- Browser(s) name and version -- : Chrome 118.0.5993.89
-- Error-message(debug-mod must be tuned on) -- : Warning: Narrowing occurred during type inference of ZEND_FETCH_DIM_W. Please file a bug report on bugs.php.net in /home/u235795/mshop.svc-ticket.ru/www/administrator/components/com_hikashop/helpers/helper.php on line 1518
Fatal error: Allowed memory size of 89128960 bytes exhausted (tried to allocate 20480 bytes) in /home/u235795/mshop.svc-ticket.ru/www/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php on line 550

Fatal error: Allowed memory size of 89128960 bytes exhausted (tried to allocate 65536 bytes) in /home/u235795/mshop.svc-ticket.ru/www/libraries/vendor/composer/ClassLoader.php on line 476

After some time I can't create a New mass action or open already existing one.

If I try to open an existing MassAction or create a new one - I redirected to a Main Hikashop menu with Fatal Error:



Try to execute it both on a local machine and remote server - result is the same.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
6 months 5 days ago #356120

Hi,

The warning is something we've reported to PHP : github.com/php/php-src/issues/8251
The issue is still open. If you can update to PHP 8.2, you would get a warning message with more accurate information which would help us explain to the PHP developers in what circumstances the issue happens.

Regarding the fatal error, it says that you have a memory limit of around 90M configured in your php.ini and that Joomla/HikaShop/the other extensions loaded on the page need more memory to run the processing of the page.
90MB is not low, but it's not high either. The default in recent versions of PHP is 128M and it's not uncommon to increase this to 256M. So I would recommend first trying to increase the memory limit of your PHP and see if that helps.
If it does, then it's just that, there is too much data in memory for that page processing and keep it increased.
If you still get the same issue after doubling the memory limit, then it's likely another issue, like an infinite loop eating more and more memory until it reaches the maximum allowed. In that case, we'll likely need a backend access and a FTP access in order to investigate what's going on.

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
6 months 5 days ago #356149

Hi
1)PHP version
I have to stay on 8.0.0 as when I try to switch to 8.1 with my hosting comnpany, then Product Listing's stopped working with Error 500. Also hosting company at a moment support 8.1 as a latest version

2) Fatal error

You are right, it is because PHP memory limit was too low, but even 256M was not enough to solve an issue, I try much bigger 4096M - then it was OK. I suppose it is because hikashop_related table became too big - more then 800 000 records, and then according to SQL log - SQL stopped responding with Fatal Error on the SELECT * FROM v638a_hikashop_product_related query.
Is there a limitation on the hikashop_related number of records? In my particular case it is used to store information about parts related to a product and visa versa, and should be at the end of development around 3Mil records in total. I'm afraid that this q-ty is beoynd Hika capabilities.

Please Log in or Create an account to join the conversation.

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
6 months 4 days ago #356150

Hi,

That's hard to say. There is no hard limit. But we never tested with more than a couple thousand related entries.

What exact information did you see in the MySQL log ?

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
6 months 4 days ago #356172

Hi |
I attached SQL logs for both 256M and 4096M memory limit in PHP 8.0 ( For development purpose I use local Apache and can change PHP parameters easily)
The same script was run msshop.local/administrator/index.php?opt...shop&ctrl=massaction
then +New button was pressed
256M - Fatal error
4096M - OK

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
6 months 4 days ago #356179

Hi,

Try changing the line:

$db->setQuery('SELECT * FROM '.hikashop_table('product_related'));
to:
$db->setQuery('SELECT DISTINCT product_related_type FROM '.hikashop_table('product_related'));
in the file plugins/system/hikashopmassaction/hikashopmassaction.php via FTP.
It should hopefully help.

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
6 months 2 days ago #356218

Hi

It is much better
Now hikashop _related file is about 2 mil records ( this is a limit, I don't expect furter growth of this file) and New mass action was opened with 2048M limit, I will check other functioins and in case of further problems open tickets.
Thanks Nicolas!

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum