I set up to publish 5000 posts per day, but only posted 2000

Keywords: WordPress - AWS - Technical issue - Services (Apache, MariaDB, MySQL…)

bnsupport ID: 7e382432-823b-a99b-a7b9-3504765329bb

bndiagnostic output:

? Apache: Found possible issues
? Mariadb: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/debug-errors-mariadb/
https://docs.bitnami.com/installer/faq/linux-faq/administration/increase-memory-linux/

bndiagnostic failure reason: The tool could not find any issue

Description:
Hello
I used the plugin Auto Post Scheduler v1.82 to automatically publish posts, I set up to publish 5000 posts per day, but only posted 2000. I’ve contacted the developer and here’s why he gave it:
You seem to have enough memory to load 2500 posts from a Query, but does your server have a hard timeout restriction? Do you use mod_fcgid or mod_fastcgi or a fastcgi process manager like php-fpm? It could be the server is terminating the script before it finishes processing the 2500 posts. If that’s the case you could switch to a server cron job (no timeout limit) or change the settings to process 200 posts every hour instead of 2500 every 12 hours.
So what should I do?
Thank you for your time,
Huang

Hi @hwp994108018,

Yes, our solution uses PHP-FPM. You can try to increase the execution timeout in PHP

https://stackoverflow.com/questions/40478256/how-can-i-increase-max-execution-time-in-bitnami-wp-multisite

You need to follow the plugin’s developer recommendation. He mentioned that you can change the number of posts to process, did you try that? He also mentions the idea of creating a cronjob, please do so if you continue running into issues.

Hello
Thank you for your reply.
But the strange thing is that the plugin worked fine, until a few days ago, the number of posts posted per day started to decrease. I set up 2500 posts every 12 hours, but only posted 1000.
And the number of posts posted every day is getting smaller and smaller.

Even with bitnami’s stack update, the personal settings are immutable, right?

Thank you for your time,
Huang

I set 401 posts every 1 to 3 hours at 0600-1800, but actually only about 600 posts were posted, even if it was published every 3 hours, there should be 1600 posts being posted

That’s strange, did you increase the timeout in PHP?

This is the other alternative you have. I understand the developer is referring to this (unless the plugin/tool has any binary to run in the command line). You can ask him to get more info about the cronjob alternative.

https://docs.bitnami.com/aws/apps/wordpress/configuration/disable-wordpress-cron/

Hello
Thanks for your help。
I used Approach A, followed the tutorial, I Disable the wp-cron.php script in the /opt/bitnami/wordpress/wp-config.php file, then ran the command:

sudo crontab -e

, and finally added

0 * * * * su daemon -s /bin/sh -c "cd /opt/bitnami/wordpress; /opt/bitnami/php/bin/php -q wp-cron.php".

Please help me check if this is correct, here is the screenshot:

how should I modify this command if I want to run it every 5 minutes.

Thank you,
Huang

You need to use */5 * * * *

https://crontab.guru/#/5_*_

*/5 * * * * su daemon -s /bin/sh -c "cd /opt/bitnami/wordpress; /opt/bitnami/php/bin/php -q wp-cron.php"

Is this command correct?

That’s correct @hwp994108018! :slight_smile:

Hello
In addition to caching plugins like: W3 Total Cache, bitnami WordPress has some system-level features to cache posts? I’ve disabled w3, but there still seems to be something caching posts.
After I contacted the plugin developer, he gave the following reasons:
"Is there something caching the database on your site?

Can confirm:
Clear the WAP log file (all db log entries deleted) -> screenshot 1.
Wait a few minutes, refresh the page, and previous db log entries are restored by something -> screenshot 2.
That should not happen. It can only happen from restoring a cache as far as I know.
"
Another thing, the latest version of WordPress doesn’t seem to be posting posts properly. Posts can only be published successfully in Code Edit mode. In another mode, the error often appears "Updating failed. The response is not a valid JSON response.”

Thank you for your time,
Huang

opcache is enabled in the solution by default

[opcache]
; Determines if Zend OPCache is enabled
opcache.enable = 1

You need to disable it in the php.ini file and restart the services for the change to take effect.

There is nothing caching the database, opcache only caches the PHP files.