All done...Unable get lock for processing

When I tried to send a campaign this morning, the status displayed “All done” almost immediately without sending anything. The button label said “Resume processing”.

AllDone

If I click “Resume processing”, it processes for a few minutes, then displays a status of “Unable get lock for processing”.

GetLock

I haven’t updated anything since my last campaign. I am not exceeding my host’s send limits; I have throttling set to 20 emails every 6 minutes. I verified that the selected list has members (405 as of this morning).

I tried deleting old entries from the sendprocess table and changing the alive value from 1 to 0, but I keep getting the “Unable get lock for processing” error. If I stop the campaign, clear the sendprocess table, and re-queue the campaign, the process starts over with the “All done” status.

Any ideas what else might be the problem?

And then all of a sudden…it starts working again. I have no idea why.

And then it’s back again! Argh!! lol! Is this a problem with my host’s server?

GetLock2

@koerper70 Possibly the send process is failing and not “cleaning-up” properly. Can you look for any php errors being reported anywhere, sometimes there is an error log file in the /lists/admin directory.

It might help to enable php error reporting. In file admin/init.php change 0 to 1 on this line

error_reporting(0);

I have error_reporting enabled in init.php, but I don’t see anything that looks like an error log under the admin directory. I also have (had, because I just disabled it again) VERBOSE mode enabled, but I don’t see anything that looks relevant in the event log. No errors of any kind that I can see.

Just as an update: I paused the campaign and then requeued it, and it completed without further problems.

phplist disables error reporting early on, but the change that I suggested will enable it again.

1 Like

If you mean changing error_reporting(0) to 1, that’s what I had already done. Between that and the VERBOSE logging option, I have lots of stuff in the event log, but no errors and I still don’t see anything that looks like an error log in the admin directory. Is there somewhere else I should look or a specific file name?

When I (phplist 3.6.12) process the queue and click on stop before it is finished, then click on resume, my page is hanging. Forever it seems. I am on SiteGround, I thought it had to do with their server because I saw this in error_log: … Timeout waiting for output from CGI script … after 5 min or so, while php max_execution_time was set to 15 mins.
They reported me the ‘unable get lock for processing’ message wich I never saw (?). That led me to this forum and to “Unable get lock for processing - #9 by jbhunt17
Setting ‘alive’ to 0 fixed my problem. After that I can resume the process and it finishes, sometimes I have to close the window and log into phplist dashboard again. When not hanging I noticed the ‘alive’ field in the table _sendprocess was counting, time I presume. But when hanging this stayed on the same number

Could this be a bug in phplist?

@koerper70 The “lock” should be invalidated after, I think, 600s i.e 10 minutes. Then you should be able to restart the sending.

You should use batch size and period so that phplist sends for only one minute. That might help avoid this problem.
Alternatively use a cron job to process the queue. Then you can pause sending a campaign by changing its status to “suspended”.

No this is incorrect, i had the same problem and could not resolve permanently resolve the problem. I asked Jesus (Son of God) for the solution.

To fix this error go to admin/lib.php edit the file to

while ($running_res[‘age’] && $count >= $max) { # a process is already running
// while ($count >= $max) { // don’t check age, as it may be 0