[Solved] Processbounces yields 404

Hi - although this is my first post, I have been using phplist for 10 years, and was active on the ‘old’ forums… that being said, this has me stumped:

Lately when trying to ‘process bounces’, the page hangs for quite a while, and eventually turns a 404.

  • Once this happens, the entire phplist install is unusable for 3-5 minutes; any pages requested do the same thing - hangs in a state of loading before eventually turning a 404

  • this is a relatively new issue, bounces had been working until the last couple of months

  • I have upgraded phplist to latest version, but problem persists

  • I am with bluehost, and had upgraded to Cloud Sites hosting. Bounces had been working prior to this hosting upgrade.

I have been going back and forth with bluehost for 2 weeks and they have no sign of memory limit being pushed / crashing.

Has anyone experienced anything similar, or have any tips?


@Metalmike Do you know how many bounces are in the phplist database? It sounds like the bounces process might be failing. The process of counting consecutive bounces for each subscriber can be quite intensive and might be timing-out.

If you view bounces you can see how many are returned, and delete some or all.

@duncanc Thank you for answering!

  • I have 5621 processed bounces, and 424 unidentified bounces in the database.
  • My ‘bounces’ mailbox currently has 848 returned emails to be processed.

If I delete all bounces from the database, am I going to lose the user counts? (number of bounces per user)
I have it set to mark users ‘unconfirmed’ if they generate 3 bounces in a row.

If you delete some bounces then there might be an effect on the “consecutive bounces” processing. It just depends on which campaigns you have sent to which subscribers.

phplist doesn’t handle this perfectly, so the simplest thing to do is to delete bounces more than two months old. But having over 5000 bounces is very likely to cause a problem for phplist.

@duncanc So this is interesting - I deleted all users with over 2 bounces, then deleted bounces. I also deleted the Log Of Events (which was also quite hefty).

Now I am having a similar issue when I try to process bounces, except instead of a 404 I eventually get a 504: Gateway Timeout

Any idea what is happening now?
Is this a case of my server running out of php resources?

The 504 error might just be a different manifestation of the same problem.

Has this been the normal state of events - 5000 bounces in the system and another 500 to download? Or has the number of bounces suddenly exploded?

In case the problem is phplist not being able to download the bounces you could try modifying the maximum number it handles in one run.
In file admin/processbounces.php look for this line, it is line 358 in release 3.2.4

return processMessages($link, 100000);

then change 100000 to a much smaller number, say 100. That will limit the number of bounces that phplist tries to download and process.
See whether that solves the immediate problem.

Well, I have never deleted bounces before, so yes I would say it was normal to have a large number on hand. I would also say that 500 is an average number of bounced to process after sending a campaign - we have one list with 12175 subscribers, and another with 6222 subscribers.

I had been looking to throttle the processbounces function, and was close (i was looking at $batchSize in the same file).

Unfortunately, modifying the maximum number of bounces per run to 100 (and then 10, and 1) did not solve the issue. I am still getting 504 Error.

Interestingly, I have installed a fresh instance of phplist on a different domain, same server (using Bluehost’s “Mojo Marketplace”, at their suggestion). I added a total of 2 subscribers - one of which I knew would bounce - and sent a campaign. When I try to processbounces on this new install, I am also getting a 504.

Is it possible that this is a server issue after all?

Is process bounces the only page that is causing a problem? If it is then the problem should be either the volume of bounces, which you seem to have ruled out, or the connection is not working. But the latter should cause a “clean” error not a 404 or 504 web server error.

Have you asked your hosting company about the 504 error?
Can you run process bounces as a cron job?

Yes, processbounces is the only page causing a problem.

I have been in contact with our hosting company the entire time, including when I got the 504 error, but they are really not helping (seemingly unwilling to try), I think because phplist is a 3rd party platform.

So at your suggestion, I tried setting up a Cron Job to process bounces.

My first attempt yielded this error:

phpList version 3.2.4 (c) 2000-2016 phpList Ltd, http://www.phplist.com
Error: Your PHP version is out of date. phpList requires PHP version 5.3.0 or higher.

I found this puzzling, since we were running PHP 5.6
I switched to PHP 5.4 (Single php.ini), and the above error was not repeated.

Ran the Cron Job again after updating the PHP version, and received this error:

PHPlist - Cannot create POP3 connection to pop.gmail.com: Can't connect to gmail-pop.l.google.com,995: Network is unreachable

This is interesting, because the issue did not exist until after we upgraded to Bluehost Cloud Sites - Business. Also, when I alter the connection settings in config.php, the processbounces page does resolve, with a clean on-screen error “Cannot create POP3 connection to pop.gmail.com: Can’t open mailbox…”

Is it possible that the host is in fact not letting Phplist making network connection on outgoing ports due to security issues?

@Metalmike That error message suggests that you are using the wrong port number or the port is blocked.

@duncanc well I finally got this working… thank you so much for your help!

It was indeed an issue with our host / server blocking the port.
We are on a shared host, so I had to go through support desk and have them unblock it; I unfortunately do not have any technical details to share from that process.

One other thing, when I tried processing bounces the first time after the connection was repaired, I was getting an onscreen error from Google mail “web login required”.

I had to change some settings within Gmail to allow phplist access - see this following link: