Problems while processing queue and bounce in phpList and abruptly stopping

Note: This post is part of the series written on phpList3. To read the other post, have a look at Setup Bounce Handling in phpList.

In this post, I have written a common problem that people face, when processing queues or bounces on phpList.

Bugs and Problems faced during Bounce/Queue Processing

When processing bounce, if any of the following occurs:

  1. If manually using the browser, at the end if empty text-box is displayed
  2. If using the command line, nothing is displayed and scroll is at the bottom of the screen.

It indicates an error has occurred, follow the steps below to fix it:

  1. Open you phpList database
  2. Open the table `phplist_sendprocess`
  3. Unset the alive flag, where page value is `processbounces` or `processqueue`if you are planning to process bounces or queues respectively.
  4. Alternatively, use the following MySQL query:
  • For bounces:
UPDATE `phplist_sendprocess` SET `alive` = 0 WHERE `phplist_sendprocess`.`page` = 'processbounces'
  • For queues:
UPDATE `phplist_sendprocess` SET `alive` = 0 WHERE `phplist_sendprocess`.`page` = 'processqueue'
The reason this is done is when phpList starts processing bounces, it sets a flag variable indicating that it has started processing bounces, in order to ensure that no other process if started at the same time also performs the same operation of processing bounces. The second one will simply bail-out. On completion, it automatically resets the flag, allowing another process to start. 
When stopped in between, it fails to reset the flag, thereby entering a state of Deadlock, in which no process is executing and every new process spawned by phpList thinks that a process is being executed.