Page 1 of 2

New hosts and when updating and product there is a lag when saving

Posted: Fri Apr 04, 2025 2:23 pm
by 14Steve14
Phoenix 1.0.9.0 PHP8

This may be something that we have to live with but since moving to a new hosts we are having a small problem when updating products in our admin. There is a short lag of maybe 5-10 seconds when ever we click the save button when we update a product, or create a new product. No other action in the admin seems to be affected. We are having the same problem on our test site which is on the same new hosts but using a different database.

I have tried uninstalling some added modules and code which were hooks and even with only the original core categories code there is still a lag. I am assuming that this is something to do with the database or the database server. There are no errors in the log files for the live site and the test site.

I have checked the database and the products table, plus tried repairing the table in phpmyadmin and its all reported back as OK.

I have asked the hosts and they say there are no errors on the server. The database is stored on the same server apparently as the website.

Does anyone know of a way to test what the code is doing when updating a product, or even had a similar problem.

Cheers
Steve

Re: New hosts and when updating and product there is a lag when saving

Posted: Sat Apr 05, 2025 7:55 am
by burt
It's not something that's been reported previously as far as I know.

It might be worth looking at the hosting access_log immediately after updating/making a product to try to see where the process is hanging.

Re: New hosts and when updating and product there is a lag when saving

Posted: Sat Apr 05, 2025 8:42 am
by 14Steve14
Thanks Gary. Not blaming Phoenix for this as convinced its a setting somewhere on the server, but no idea where to find what is causing the problem. Will have a look on the server logs to see if I can see anything. Host say there is no problem which is what I would expect them to say, but there must be something somewhere.

Re: New hosts and when updating and product there is a lag when saving

Posted: Mon Apr 07, 2025 10:23 am
by Pierre_P
I had this long wait cause each time you are editing or adding a new product the products xml files was renewed

Re: New hosts and when updating and product there is a lag when saving

Posted: Mon Apr 07, 2025 10:32 am
by burt
That would be a possibility especially on shops with a lot of products.

To test if this is the culprit, simply remove this file (temporarily for testing);

/includes/hooks/admin/catalog/XML_writer.php

and then, when it is removed...try updating a product.

If there is still a lag, you know this is not the problem area.
If the lag is gone, you know this is the problem area.

Re: New hosts and when updating and product there is a lag when saving

Posted: Mon Apr 07, 2025 4:24 pm
by 14Steve14
Gary

Quick update.

I remove the code /includes/hooks/admin/catalog/XML_writer.php that you suggested and the lag is gone.

Re: New hosts and when updating and product there is a lag when saving

Posted: Mon Apr 07, 2025 4:43 pm
by burt
OK, I'll try to think of a different way to update the XML when products are edited/added.
Leave it with me.

Re: New hosts and when updating and product there is a lag when saving

Posted: Mon Apr 07, 2025 4:59 pm
by heatherbell
burt wrote: Mon Apr 07, 2025 4:43 pm OK, I'll try to think of a different way to update the XML when products are edited/added.
The addon already has a neat manual update button? Does it have to be automatic on product edit/save?

Re: New hosts and when updating and product there is a lag when saving

Posted: Mon Apr 07, 2025 5:10 pm
by burt
I haven't looked at it in a long time.
Does it have something in the dashboard?
I seem to vaguely remember that.

Re: New hosts and when updating and product there is a lag when saving

Posted: Mon Apr 07, 2025 7:45 pm
by heatherbell
burt wrote: Mon Apr 07, 2025 5:10 pm Does it have something in the dashboard?
Yes, icons to renew separately or all files at once.
Screenshot 2025-04-07 204250.png