How Long Should The DB Update Take For Marketpress?

Hello, I have updated marketpress to the latest version and as you know it requires a database update. I have around 300 products with variations. It has been running for approximately 30 minutes now and the bar is still completely gray, no progress shown. Is this normal or do you think the process has timed out?

Thanks for any input you may have,

Nick

  • Rupok

    Hi Nick,

    Is this normal or do you think the process has timed out?

    Well, 30 minutes for 300 products with variation is too much unless each of your products has hundreds of variations. I don't think it should take this much time generally. So either there is a lack of memory for running the whole process or the process has timed out.

    To find out the reason, can you please turn on debug mode in WordPress? To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

    define('WP_DEBUG', true);

    In order to enable the error logging to a file on the server you need to add yet one more similar line:

    define( 'WP_DEBUG_LOG', true );

    In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

    Depending on whether you want your errors to be only logged or also displayed on the screen you should also have this line there, immediately after the line mentioned above:

    define( 'WP_DEBUG_DISPLAY', false );

    The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

    Past errors here. If the file is very long, paste them to a text file and attach with your reply.

    Not to troubleshoot the issue, can you increase max execution time and memory limit for your WordPress instance? To know how you can do this, can you please check these articles?
    https://premium.wpmudev.org/blog/increase-memory-limit/
    http://www.wpbeginner.com/wp-tutorials/how-to-fix-fatal-error-maximum-execution-time-exceeded-in-wordpress/

    I believe, these will help.

    Please provide us your debug data and let us know how it goes after increasing execution time and memory limit. If you still face the same issue after increasing, would you mind allowing Support Access so we can have a closer look at this?

    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please confirm here when you are done granting Support Access. I'm looking forward to hearing from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Luís

    Hi Nick Simpson ,

    Hope you're doing well today!

    I checked your website and MarketPress is not longer asking for a database update, so, I suppose the update was finished. However, just to make sure, can you try complete the setup (setting the Store Pages) to see if everything is working properly?

    Also, can you make the debug file (sent in the last reply) publicly visible, so we can access to it?

    Cheers, Luís

  • Nick Simpson

    Oops, yes just made it public. I don't see a prompt to go through the setup when I login to the site.

    The product pages are all blank though, have the shortcodes changed in this new version? There were over a hundred pages already setup before this update ran, do I need to go through all these to change anything?

    On the Outer Wear category page I am using [mp_list_products paginate="true" page="1" per_page="10" filters="0" order_by="price" order="DEC" category="outerwear"]

    There are 7 products in this category and none are showing up.

    Nick

  • Nick Simpson

    Restored the site from a previous date and ran the update again, the database update has now been running for 20 minutes and seems to be going nowhere.

    I checked on the server and max php execution time is currently set to 300 seconds/5 minutes.

    Do you think this is halting the process before it completes?

    Oh and for what its worth, once I update the plugin the products drop off from displaying, even before I run the database update, for what it is worth.

    Please let me know if there is anything else I should try or if possibly somebody from support can take a look, I have granted access to the site and can restore it again it would help.

    Nick

  • Rupok

    Hi Nick Simpson,

    Do you think this is halting the process before it completes?

    Chances are there. So can you please do one thing? Revert your site to the last backup, then enable debug mode for WordPress as I suggested in my first reply on this thread, and then run the update again? This will log all errors during the upgradations process.

    Please paste the debug data in any .txt file and attach that .txt file with your reply. I believe, that will give us valuable insight regarding what's blocking the process.

    I'm looking forward to hearing from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Nick Simpson,

    Thanks for providing the debug log. But it doesn't reflect anything regarding this error which is really weird. However, can you please ask your hosting provider for the server error log? That might give us some valuable insight regarding this issue.

    And I tried to log in with Support Access, but it's showing me the following error:
    This access token has expired. Please ask the user to renew it.
    Can you please revoke and grant us permission again?

    I'm looking forward to hearing from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Nick,

    I'm so sorry for the delay in response.

    As your host says that there is nothing related to this issue in the server log, I'm getting out of clues. To confirm this is not your server specific issue, can you please revert back to the previous backup, create a clone of your instance with Duplicator Plugin and then restore the backup on another server? Then try to update MarketPress and update DB. Please let us know how it goes.

    If you don't face this issue on that new server, then this is somehow your server specific issue. But if you can regenerate the same delay in your new server too, please let us know. I'll ping our SLS (Second Level Support) guys to investigate the issue further.

    I'm looking forward to hearing from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Nick Simpson,

    Well, you can do that by creating a clone copy and change your DNS to forward your domain to that staging location. But the easier solution will be setting up another domain. So at first host that new domain, take a backup of your current site with Duplicator plugin, upload the backup copy to the root folder of your newly hosted domain. Then follow the instructions of Duplicator to restore that backup on that new domain. In this way, both your live site and staging site will be accessible and we can check both at the same time. What do you think?

    Have a nice day. Cheers!
    Rupok

  • Nick Simpson

    Hi Rupok, I have moved the site using duplicator to http://wptestingsite.com and it gave the same result. The db update just loaded and never completed. I left it open last night and it was still spinning this morning. There was no error, it just hung during the update it seems.

    Please let me know what the next step may be, this site has been unusable to my client for some time now. I can roll back to a very old backup, but I am not sure how many products will be lost in that effort. So, I am wondering if there is any way to export the products themselves and possibly reinstall wp and the plugins or where I might go next here.

    Any suggestions would be greatly appreciated,

    Nick

  • Rupok

    Hi Nick Simpson,

    This is really weird. Can you please confirm from which version you are trying to update to the latest version? Can you please restore your old backup on your staging site so we can try to run the database update by ourself to investigate the issue? Would you mind allowing Support Access to your staging site so we can have a closer look at this?

    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please confirm here when you are done granting Support Access and restoring old backup. I'll try to find the issue. If I can't, I'll ping one of our SLS (Second Level Support) guys to have a look at this.

    I'm looking forward to hearing from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Nick,

    Thanks for the details. I've already pinged one of our SLS guys and I believe he will have a look at this and come up with an idea soon.

    Can you send me message with FTP and WP access credentials through our secure contact form here: https://premium.wpmudev.org/contact/ so our SLS guys can investigate further regarding this and try to find a fix?

    Subject: "Attn: Rupok"
    - WordPress admin Username
    - WordPress admin Password
    - Login URL
    - FTP Username
    - FTP Password
    - FTP Host
    - Link back to this thread for reference
    - Any other relevant URLs

    Select "I have a different question" for your topic. This and the subject line ensure that it gets assigned to me.

    Please keep in mind, our SLS people work round the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and provide a feedback.

    Have a nice day. Cheers!
    Rupok

  • Panos

    Hey Nick Simpson ,

    There are products that have some variations and your server can't hold this operation. I even tried with 1 product each time (default was 20).

    So I made a custom mu-plugin and seems to be working.

    I have it attached here, and is already installed on your test site.

    This adds a new sub menu "Force DB Update" at the Store Settings admin menu.

    In the page that opens simply click on the "Force Update" button. Unfortunately, since it is a custom solution, it doesn't have any progress bar. However it will print on the screen the product ids and variation combinations.

    After you click on the Force Update button you need to make sure you leave the tab open. The whole process will take several hours to finish.

    I have tested it on your test site, could you please have a look on the products (on admin) and let me know if they contain the prices and variations?

    Before you upload this file it is important you keep a backup. After backup is taken you can upload file at the wp-content/mu-plugins folder. If you wp-content folder does not contain a mu-plugins directory, simply create a new empty folder and name it mu-plugins.

    Thanks!
    Panos

  • Nick Simpson

    Hi Panos, thank you for taking a look into this. I will be glad to give this a test on the live site after running a backup soon. However, there seems to still be problems on the test site after the update.

    The formatting has changed around the header of the site, text and images are moved around and no products display in any of the categories. I also noticed that the menu on the left has all sorts of new items on it and the existing menu items are no longer in order.

    Is this much change expected after simply updating the marketpress plugin?

    I will give it a try and let you know what it looks like on the live site. I really appreciate you taking the time and effort to work out a custom solution and I will be in touch soon.

    Nick

  • Nick Simpson

    Sorry for the delay, I am going through the site now and getting ready to give this a run after backing everything up. However, I notice one more possible issue before running the update as suggested.

    I see that the Marketpress plugin is listed twice, one showing version 3.1.2 which is activated and one v3.0.0.7 which is not activated. Do you think this has something to do with the issues I have been running into here or should only the activated plugin be affected by these changes?

    Thanks for any ideas on this you may have.

  • Nick Simpson

    OK so on the live site I don't get the new menu item when I add the file to the wp-content/mu-plugins folder. I did create the folder and the file is set to 0644 permissions.

    Do I need to set different permissions for the file to generate the menu item possibly?

    Oh and for what it is worth the testing site is not located on the same physical server as the live site, I purposefully created a new hosting test site to see if the plugin db update would run as expected in a different server environment as suggested by support earlier in the thread.

    If turning on support for the live site would help please let me know, this site has been non-functional for some time now and I would really like to get things back in order if possible.

    I suppose the testing site could be backed up with duplicator and moved to the live site as well, but did not know if that would cause more harm than help.

  • Nithin

    Hey Nick Simpson,

    Hope you are doing good today. :slight_smile:

    I see that the Marketpress plugin is listed twice, one showing version 3.1.2 which is activated and one v3.0.0.7 which is not activated. Do you think this has something to do with the issues I have been running into here or should only the activated plugin be affected by these changes?

    This is odd, did you install two MP versions?

    If turning on support for the live site would help please let me know, this site has been non-functional for some time now and I would really like to get things back in order if possible.

    Default folder/file permissions as you have stated should be enough to make it work. Could you please enable support access, so that I could ping Panos, and will ask him to give a closer look at this issue.

    Please do let us know once you have enabled support access, so that we could get this sorted. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hey Nick Simpson,

    Hope you are doing good today. :slight_smile:

    I checked your live website, and I could see the menu isn't visible. It seems like the issue is with the permissions in dashboard, as a workaround, could you please try the following url, and once you update the DB, the menu should be visible:
    http://domain.com/wp-admin/admin.php?page=mp-db-update

    I have created a temporary admin account(wpmudev), you can delete it once we get this resolved. Please let us know how that goes, so that we could help get this sorted. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nick Simpson

    OK I will give it a go now nithin but I do notice that the left side menu is now not showing up on the site, any idea what happened there? There seems to be a lot of css changes or at least a lot of sections of the site that have been re-aligned since installing the latest version of this plugin, were there some major changes on the backend that may be causing this. Not complaining, its just looking like a lot of cleanup work even once the database gets updated from a simple plugin update. I just have not seen things like this from other updates from plugins from wpmudev.

    I will touch bases and let you know how it goes and thank you!

    Nick

  • Nithin

    Hey Nick Simpson,

    Hope you are doing good today. :slight_smile:

    but I do notice that the left side menu is now not showing up on the site, any idea what happened there?

    I'm afraid, I'm not sure what you meant here. Could you please provide a screenshot, so that I could have a better idea. Which exact left side menu did you mean?

    Database updates are more related to the backend, and it won't break any CSS, or any settings in your dashboard. Please let us know how it goes, so that we could help get this resolved. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nick Simpson

    Hello nithin, I ran the url you provided and let it run overnight to make sure it was complete. However, I still do not see the “force db update” as a menu item. Any other ideas on how to get this to run?

    I understand the DB update should not change any site styles, but once the plugin is updated it changes a considerable amount of things on the homepage including the menu that is no longer there. You can see where the menu was on the test site here : http://wptestingsite.com

    Either way, I don't have a problem working on fixing these if we could get the store to at least display correctly, I just want to be sure the store is in place before I move on to working on clearing those smaller issue up if possible.

    On the testing site which I did run the manual update on all the store pages are blank.
    Ut on this page I don’t see any of the products displaying: http://wptestingsite.com/hi-vis-vests/

    I am using the following code and there are no products displayed:
    [mp_list_products paginate="true" page="1" per_page="10" filters="0" order_by="price" order="ASC" category="hi-vis-vests"]

    If I look on the back end it says there are 17 products in this category, but nothing shows. Have the shortcodes changes on the recent version?

  • Kasia Swiderska

    Hello Nick,

    Hello nithin, I ran the url you provided and let it run overnight to make sure it was complete. However, I still do not see the “force db update” as a menu item. Any other ideas on how to get this to run?

    Can you check again if that MU plugin from Panos is in right place? I checked your plugin list and there is no MU plugins there

    Please see more info about MU plugins http://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    I understand the DB update should not change any site styles, but once the plugin is updated it changes a considerable amount of things on the homepage including the menu that is no longer there.

    I compared code of both sites and code for that menu is not in placed in the site. Then I checked again plugin list and plugin AllWebMenus WordPress Menu that was used to generate that menu is not activated, so that is reason why its not showing

    Either way, I don't have a problem working on fixing these if we could get the store to at least display correctly, I just want to be sure the store is in place before I move on to working on clearing those smaller issue up if possible.

    Your store is not configured - please see that you still have MarketPress wizard showing

    And if you go to Store Settings -> Presentation -> Store Pages - those pages are not created - and they are crucial for store tu run. Those have to be created.

    I am using the following code and there are no products displayed:
    [mp_list_products paginate="true" page="1" per_page="10" filters="0" order_by="price" order="ASC" category="hi-vis-vests"]

    No, that shortcode looks fine. But can you first configure store and then also flush permalinks (go to Settings -> Permalinks -> click save) and then see if this will fix the issue?

    kind regards,
    Kasia

  • Lindeni Mahlalela

    Hello Nick,

    I hope you are doing great today. I noticed that it has been a long time since the last post on this thread and there has been no reply from you.

    I would like to know if you have this issue resolved as I can see products showing up on the pages of your website. I will be happy to know you got this resolved but if not we will be more than happy to investigate further and solve this issue for you.

    Let us know if you still need help so we can continue investigating.

    I hope you enjoy the rest of your day.

    Cheers,
    Mahlamusa