10up / WP-Minions

ARCHIVED: Job Queue for WordPress
GNU General Public License v2.0
231 stars 41 forks source link

Jobs not being added to Gearman queue. #51

Open nothingatalldotnet opened 3 years ago

nothingatalldotnet commented 3 years ago

This is the third time I have set up WP Minions, normally no problem, but this time I'm having major issues :(

First up, server:

I think it is also worth noting that the server uses Plesk, however I have full control of this server via SSH etc. I don't believe this is an issue either however we are running Wordpress through a Nginx > Apache reverse proxy.

Following the instructions as normal (note i have changed some bits for security):

wp-config.php

        define('WP_MINIONS_BACKEND', 'gearman');
        define('WP_ASYNC_TASK_SALT', 'somesalt-gearman');

Gearman is running with the database information added to /etc/sysconfig/gearmand

OPTIONS="--listen=localhost --verbose=INFO  -q MySQL --mysql-host=localhost --mysql-port=3306 --mysql-user=someusr --mysql-password=somepassword --mysql-db=somedb--mysql-table=wt_tp_gearman_queue"

And when restarted I see the table created within the database.

Supervisor is running and working, as expected it's used on another application so this should be fine. supervisorctl status

laravel-worker:laravel-worker_00       RUNNING   pid 23663, uptime 1:41:38
my-minions:my-minions-00   RUNNING   pid 23664, uptime 1:41:38

The service is setup also /etc/systemd/system/wp-minions-runner@.service

[Unit]
Description=WP-Minions Runner %i
After=network.target

[Service]
PIDFile=/var/run/wp-minions-runner.%i.pid
User=myuser
Type=simple
ExecStart=/usr/bin/php /var/www/vhosts/somesite.com/httpdocs/wp-minions-runner.php
Restart=always

[Install]
WantedBy=multi-user.target

And enabling and starting with the following seems fine also

systemctl enable wp-minions-runner@{1..1}
systemctl start wp-minions-runner@{1..1}

However, firing any event simply does not pass the task to Gearman it seems, i'm not seeing it in the queue table nor any errors.

Running gearadmin --status

somesalt-gearman:WP_Async_Task  0   0   2

And looking at the Gearman logs I can see a connection and no errors:

   INFO 2021-02-24 13:21:10.000000 [  main ] Accepted connection from ::3534:3937:3800:0%1483259374:57180
   INFO 2021-02-24 13:21:10.000000 [  main ] Accepted connection from ::3537:3138:3000:0%1483259374:57182

I'm running out of ideas now! Any help with this would be appreciated!

hugoofilipe commented 3 years ago

Hi, Someone has the same problem? Im dealing with this problem right now :( Has someone find a solution?