504 Gateway error

  • Posts: 135
  • Thank you received: 5
4 years 2 weeks ago #330081

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.9
-- Browser(s) name and version -- : Brave Version 1.20.110 Chromium: 88.0.4324.192 (Official Build) (64-bit)
-- Error-message(debug-mod must be tuned on) -- : Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in ..../libraries/joomla/database/driver/mysqli.php on line 891

This is when I am trying to open a product with a lot of variants. Then a get a 504 gateway error. Also unable to delete the product Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in .../libraries/src/Log/LogEntry.php on line 116

Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in ..../libraries/joomla/database/driver/mysqli.php on line 891

This is when I am trying to open a product with a lot of variants. Then a get a 504 gateway error. Also unable to delete the product Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in .../libraries/src/Log/LogEntry.php on line 116

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

  • Posts: 83404
  • Thank you received: 13497
  • MODERATOR
4 years 2 weeks ago #330083

Hi,

The error is because you have too many variants and when HikaShop loads the variants data in memory, it hits the memory_limit of your php.ini.
To delete the product, you'll have to do it via PHPMyAdmin.
You can run such MySQL query:
DELETE * FROM #__hikashop_product WHERE product_id = XX OR product_parent_id = XX
where XX is the id of the product, and #__ is to be replaced by the table prefix of your Joomla configuration.

The following user(s) said Thank You: markfell

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

  • Posts: 135
  • Thank you received: 5
4 years 2 weeks ago #330110

So can I ask what the maximum variant limit is ?

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

  • Posts: 83404
  • Thank you received: 13497
  • MODERATOR
4 years 2 weeks ago #330157

Hi,

HikaShop doesn't have such a limit.
However, the more variants you have, the more it takes time for HikaShop to load the data from the database and the more memory it takes to process that data.
So based on the resources available on your server and the memory_limit and max_execution_time settings of your php.ini the limit your website can handle can vary from a few dozens to around a thousand per product. Above that, I think the page processing time would be too important even on big servers.

The following user(s) said Thank You: markfell

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

Time to create page: 0.058 seconds
Powered by Kunena Forum