I think I know why you get the error.
After the script that converts all the locations is started, an additional ajax request is made every 10 seconds to count the amount of converted stores. This is done to make sure the upgrade script is still running, and to give the user an update on the amount of locations that is left to convert.
If after 10 seconds the number of converted stores is the same as 10 sec before, then nothing happened and the timeout msg is shown.
Maybe because of the almost 75000 locations the sql chokes somewhere. It does do a select * on the wpsl_stores table, and if that takes longer then 10 sec ( no idea if it does, but with 75000 locations it could take a bit longer ), then nothing was converted within 10 sec and you get the timeout msg. Which is not what really happened, the sql is simple still running.
You can easily test if this is the case by opening the /admin/js/wpsl-cpt-upgrade.js and on line 31 ( ver 2.0.2 ), you have this line of code.
updateInterval = setInterval( function() { convertCptCount(); }, 10000 );
Change the 10000 to 20000 or even 30000. This will make it wait 20 or 30 seconds before checking if the script is still running.
If this doesn’t change anything, then try to enable wp_debug and wp_debug_log and check if any errors show up in the debug log in the /wp-content/debug.log file.
Let me know if changing the update interval makes a difference, or if something shows up in the debug.log file.
Thanks for the reply!
Changed the interval to 30000
> still get the timeout message
> nothing in the debug.log.
Changed the interval to 100000
> runs for a lot longer, but eventually I still get the timeout message
> nothing in the debug.log.
Just for kicks, I tried it in a different browser, all the to same effect. For the record, this is a pretty clean install too. Turning on wp_debug doesn’t generate any warnings or errors, and only one notice.
The number of stores it needs to convert doesn’t change at all, even after setting it to 100000?
If you check the ‘All Stores’ page there is nothing there?
Do you happen to have all the stores locations in a csv file?
Can you run this sql query in phpmyadmin, and see how long it takes to complete? Do replace the ‘name_of_your_db’ with the name of the actual wpsl table, it looks like this dbname_wpsl_stores
(SELECT * FROM name_of_your_db ORDER BY wpsl_id DESC LIMIT 74994) ORDER BY wpsl_id ASC
The number of stores it needs to convert doesn’t change at all, even after setting it to 100000?
If you check the ‘All Stores’ page there is nothing there?
> Correct, the number of store locations that need to be converted never changes. It’s been at 74994 since I started trying.
> Correct, the ‘All Stores’ page shows nothing.
Do you happen to have all the stores locations in a csv file?
> Yes! I do have all the stores in a csv file. It’s an 11MB file.
Can you run this sql query in phpmyadmin, and see how long it takes to complete? Do replace the ‘name_of_your_db’ with the name of the actual wpsl table, it looks like this dbname_wpsl_stores
> I was not able to successfully run this query in phpmyadmin. When I tried to run it the first time, it ran for exactly 5 minutes before giving a 500 internal server error. I tried running it a few more times, just changing the number of rows queried, and it worked with anything under 5,000 rows. Then I went and looked in the /usr/local/cpanel/logs/error_log file, and it showed this: PHP Fatal error: Maximum execution time of 300 seconds exceeded in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/DisplayResults.class.php on line 2959
Which makes sense because it was erroring out at exactly 5 minutes.
So I tried running the query from a remote mysql client – Sequel Pro – and it worked perfectly. It was able to return all 74994 rows in 1.19s. I ran it a few times and every time it worked perfectly.
It’s really weird why phpmyadmin takes 5min+ to run the query, and the remote mysql client does it in 1.19s.
But anyway, can you send me an email at tijmen at wpstorelocator.co? I’m working on a CSV importer, and I think in your case it’s the easiest fix to convert the locations.
You do have to cut the CSV file up in smaller parts, because I don’t think you are allowed to upload a 11mb file in WP, and also because with 11mb you will likely run into the max execution time of 300 seconds if the file is to big.
I’ve seen timeouts when adding just one location. However, clicking Preview while entering the store info, works every time. So, i do that while i’m adding individually and all is well.
Not sure if that’s going to help the OP directly, but it may be related.