back to phpList.org

Upgrading large database times out browser in client side, is there a way to upgrade from command line OR manually run the upgraded queries?


#1

I’m upgrading an old 3.0.6 install to 3.4.2, there are over 400K user records, and millions of link track records. I’ve manually pruned all click tracking data older than 3 months, and all sent messages (and related data) older than 1 year, but even that still leaves a couple million records.

I’ve removed all relevant server timeouts (php script, sessions, DB connection timeouts, etc). No matter what i try, I cant not get the upgrade to complete. I click to start the upgrade (while watching mysql in another window). When I click to upgrade, I get a blank while page with the browser showing it’s waiting for a response, while at the same time I’m Watching the server and DB logs, I can see the upgrade is starting up fine, and starts stepping through the various queries, and no errors are being logged in the server/db/php/etc (after I removed the relevant timeouts).

From what I can tell, the issue appears to be the web browser itself is killing the process because the queries take so long to run, that by the time a query finally completes the browser already killed the process on the client side because it took so long for the server to respond.

Is there a way to upgrade phplist from CLI to avoid the browser timeout error?

Or is there a way to manually run the upgrade queries from CLI, and if so where can I find the queries that need to be run to go from 3.06 to 3.4.2?

Or, maybe…someone has an idea of something I can do to keep the browser from closing the connection on the client side while the queries complete?


#2

Yes. See ‘upgrade’: https://resources.phplist.com/system/commandline


#3

Thanks, I’m a bonehead. I actually found that document but somehow missed “upgrade” was one of the available sub-commands so I moved on thinking it was for new/clean installs.

Thank you for the reply!


#4

nevermind - re-ran and got it working. Thanks for the help


#5

If I could get one more piece of advice, that I can’t find an answer too. I was able to run the upgrade from CLI, but now I’m having an issue trying to import subscribers via CLI and I’m not sure why. The upgrade command works fine, other commands like processque or dbcheck work just fine. But when I try to run import I get the following error and I can’t seem to find any doc that explains the issue.

/usr/local/bin/phplist -p import -l 3 -f /home/phplist/public_html/lists/config/test_subcribe_members.csv
phpList - phpList version 3.4.2 © 2000-2019 phpList Ltd, https://www.phplist.com

Error: Invalid security token, please reload the page and try again

Any suggestions/advice how to get around the security token error? if I try passing login= and password= the error changes to the following:

/usr/local/bin/phplist -p import -l 3 -f /home/phplist/public_html/lists/config/test_subcribe_members.csv login=admin password=abc321
phpList - phpList version 3.4.2 © 2000-2019 phpList Ltd, https://www.phplist.com

Error: Cannot find file to import (hint: use -f)