Popups order management loading very slow

  • Posts: 220
  • Thank you received: 8
8 years 7 months ago #235470

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.6.18

Hi,

Suddenly I have a problem in the backend when managing the orders.

When I try to change the order status in the orders listing the popup is empty (white popup) for about one minute. The browser shows the message 'Waiting for server...'
Only after that minute the content of the popup shows up and the behaviour is normal.
There is no error in the logs and no javascript error.

The same loading problem happens when I'm editing an order and click the button ' E-mail'.

But clicking the buttons 'Invoice' or 'Shipping invoice' works fine! Then the popup content loads right away.

Do you have any idea what might cause this problem?
Perhaps a memory problem of the server?

Thanks,
Udo

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 7 months ago #235482

Hi,

Hard to say. It would require turning the "debug mode" setting of the Joomla configuration and looking at the bottom of the popup content when you have the issue. It will explain where the bottleneck is with the processing of the content of the popup.

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

  • Posts: 220
  • Thank you received: 8
8 years 7 months ago #235678

Hi,

Using the debug mode in the popup it turns out that the problem is the afterDispatch. It takes 54 seconds!

Application 0.002 seconds (+0.002); 0.36 MB (+0.356) - afterLoad
Application 0.302 seconds (+0.300); 2.46 MB (+2.101) - afterInitialise
Application 0.302 seconds (+0.000); 2.46 MB (+0.003) - afterRoute
Application 54.974 seconds (+54.671); 8.97 MB (+6.506) - afterDispatch
Application 54.978 seconds (+0.004); 9.06 MB (+0.095) - afterRender

111 queries are logged. The problem might be in queries like
32. SELECT * FROM XXXXX_hikashop_product_related AS a WHERE a.product_id IN
Then some 6000 numbers are listed.

This happens several times. Take a look at the debug file.

File Attachment:

File Name: popupdebug.doc
File Size:605 KB




Udo

Attachments:
Last edit: 8 years 7 months ago by Udo. Reason: file still missing

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 7 months ago #235688

Hi,

Thank you for the debug data.
The problem comes from the loading of the data of the products. The system is loading thousands of products in memory and that's why it's slow.
Why it does that is not clear. With Joomla 3, the debug is much more interesting and would also tell us where each MySQL comes from so that we could better interstand where is the problem.
With the information from your debug it could come from two things:
- some kind of automated process, like a mass action, which would trigger automatically.
- a problem with the product_ids missing in the products of the order (or no product in the order) resulting in the system loading all the products instead of loading only the products of the order.
If it comes from a problem with the product_ids, updating your HikaShop might help.

But at least it's sure it's not a server issue. It's a problem with either the data of the order or with a bug in the code of your version of HikaShop.

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

  • Posts: 220
  • Thank you received: 8
8 years 7 months ago #236221

Hi Nicolas,

Thanks for your helpful reply.
Your second guess proves correct: it appears that many orders in the orders listing suddenly miss the product information.

Before short the information of those orders was correct, but after an recent upgrade of our server the information about the ordered products in the orders of January and February is gone .

Part of the server upgrade was a transition from MySQL to MariaDB. Might this have caused the loss of information?

Next is how to recover this ordered product information.
Do you think it might still be present somewhere in de dbase?

Is it possible to import the rows from a backup of the dbase?

Regards,
Udo

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 7 months ago #236226

Hi,

You need to check the entries in the table hikashop_order_product
Check if you find entries there for an order with the problem.
If you don't, it means that the entries are missing from the database. So the problem is that not all the data was migrated properly for that table. You'll have to get the data from the backup and add it there manually.
If you do, then it means that the data of the products is not correct in that table. For example, the order_product_quantity is 0.
Based on what is not ok compared to the products of order which are ok, you'll be able to find what is the problem with the data. Then, based on that, the action to take will be different.

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

  • Posts: 220
  • Thank you received: 8
8 years 7 months ago #236368

Hi,

I've checked the entries in the table hikashop_order_product.
The conclusion is that the entries for the orders with the problem are missing.

You're advice is to add these entries manually from the backup of the dbase.
Unfortunately a lot of work. And unfortunately I'm not a SQL expert.
Two questions:

1. Is it possible to add many rows at the same time? Or should I add the rows one by one?

2. Alternatively, can the problem be solved by adding the ordered products in the orders in the backend?

Regards,
Udo

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 7 months ago #236384

Hi,

1. You can add many rows at the same time. You can export the entries you want in your old database with your PHPMyAdmin as a SQL file and then import it on your new database with your PHPMyAdmin and you would get all the rows at once.

2. It's going to be a slow process. I would recommend to do it through PHPMyAdmin with import/export.

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

  • Posts: 220
  • Thank you received: 8
8 years 7 months ago #237184

Hi Nicolas,

Thanks a lot for your advice.
I have successfully imported 950 missing lines into the table hikashop_order_product.

Alas 85 missing lines were not present in this backup.

So for 25 orders the product entries still are missing.
All I have is the order information in the confirmation e-mail.

Is there a way to create the missing lines? Manually?
I had a look at the table columns and some are rather complicated (e.g. order_product_tax_info, order_product_options)

An alternative might be editing the order in the backend and adding the missing product entries. But this fails because then the subtotal and total price of the order is recalculated. But this price is correct and should not change.

Regards,
Udo

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 7 months ago #237229

Hi,

You don't need the order_product_tax_info, order_product_options columns. They are there for when you need to change the orders in the backend. For example, if you change the quantity of a product in an order, the order_product_tax_info info is used to recalculate the taxes for the order.
So if you goal is just that it displays fine for the user and the invoices, just enter the simple columns via the database and that should be good enough.

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

  • Posts: 220
  • Thank you received: 8
8 years 7 months ago #237681

Hi Nicolas,

Thanks for the information.
I took your advice and entered the first 8 columns containing the product information.

Now the problem is solved - thanks to your excellent support.

regards,
Udo.

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

Time to create page: 0.073 seconds
Powered by Kunena Forum