Hi,
thanks for your post, and sorry for the trouble.
Unfortunately, I’m not aware of slowing this down. I also doubt that this would use less memory (in the same CPU process).
Your best chance is to try to increase the limit, e.g. by setting the WP_MEMORY_LIMIT constant to a higher value in your site’s wp-config.php file, see https://ww.wp.xz.cn/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php
Regards,
Tobias
Okay thanks! Is it possible to get an error log from the plugin as currently not all the tables are being imported but also no error is being shown?
Also, please tell me if I’m completely wrong, but could it not be possible to add a sleep to the function while it iterates through the tables as this means that all the tables are not imported at the same time?
-
This reply was modified 5 years, 6 months ago by
akkatips.
Hi,
TablePress itself does not create an error log, you would have to check the server’s error log file here.
Such a “sleep” would not help, and it’s no necessary. Tables are not imported simultaneously, but in a loop, one after the other.
Regards,
Tobias
Hi,
Okay, I have managed to find the error log which is Timeout waiting for output from CGI script wp-cron.php. This error is only shown after it has been running for a long time however.
Yes this is what I meant, rather than the tables being imported at an extremely fast rate would it not be less intesive on the CPU to limit the number of tables uploaded in x amount of time? Once again please correct me if I’m wrong.
-
This reply was modified 5 years, 6 months ago by
akkatips.
Hi,
no, that would not help. The work is the same, it would just take longer (the CPU can often not really use the sleep phase for other things). Thus, other limits, like execution time might be reached then.
You could maybe try using a real server cron job here, instead of the wp-cron system. How this is done depends on your webhost company. https://www.siteground.com/tutorials/wordpress/real-cron-job/ could maybe serve as an example.
Regards,
Tobias
Hi,
Okay that makes sense appreciate the clarity! A further thing I have realised is that the tables which aren’t being imported aren’t showing up as failed like usual. Is this also just due to the running out of memory?
Fortunately I use siteground so that’s very useful. Is there anything I would need to change to make sure the tablepress auto import is triggered?
-
This reply was modified 5 years, 6 months ago by
akkatips.
Hi,
yes, essentially, the not showing up as failing is also a result of running out of memory: The import process simply is aborted, so that no status is saved for tables that had not yet been processed.
Switching that WP-Cron system to a server cron job should be sufficient to reliable trigger the auto import. To have a higher chance of it succeeding (with all tables), increasing the memory limit is necessary.
Regards,
Tobias