Store Locator Plus® for WordPress › Forums › Store Locator Plus › Remote File Import cron job runaway
Tagged: cron
- This topic has 14 replies, 3 voices, and was last updated 4 years, 7 months ago by Cici.
-
AuthorPosts
-
March 30, 2020 at 6:51 AM #79092D HParticipant
I can manually import a CSV file without issue. However, when I use the Remote File Import feature it continually spawns cron schedules in WordPress like so:
% wp cron event list
+——————–+———————+——-+—————+
| hook | next_run_gmt | next_ | recurrence |
+——————–+———————+——-+—————+
| cron_csv_import | 2020-03-27 22:08:51 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:20:44 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:22:24 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:24:22 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:27:22 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:43:19 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:44:28 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:47:30 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:51:31 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:55:31 | now | 12 hours |
| cron_csv_import | 2020-03-28 05:57:31 | now | 12 hours |
| cron_csv_import | 2020-03-28 06:01:31 | now | 12 hours |
| cron_csv_import | 2020-03-28 06:03:31 | now | 12 hours |
| cron_csv_import | 2020-03-28 06:07:31 | now | 12 hours |
| cron_csv_import | 2020-03-28 06:11:31 | now | 12 hours |
| cron_csv_import | 2020-03-28 06:14:30 | now | 12 hours |A few minutes later…
% wp cron event list | grep -c “cron_csv_import”
21Theses also correspond to a file in /var/tmp..
What is going on?
Here is a sample from the CSV file..
sl_store,sl_address,sl_city,sl_state,sl_zip,year_established,identifier
Apothecare Pharmacy at Shop n Save,150 Walnut Hill Road,Uniontown,PA,15401,2020-03-20 10:45:22.0,3994832
March 30, 2020 at 7:30 AM #79093D HParticipantThis is what happens when manually run the scheduled hook..
% wp cron event run cron_csv_import Notice: Undefined index: added in /slp-power/include/module/locations/SLP_Power_Locations_Import.php on line 806 Notice: Undefined index: record in /slp-power/include/module/locations/SLP_Power_Locations_Import.php on line 645 Fatal error: Uncaught Error: Call to undefined method SLP_Power_Cron::add_message() in /slp-power/include/module/cron/SLP_Power_Cron.php:35 Stack trace: #0 /slp-power/include/module/cron/SLP_Power_Cron.php(108): SLP_Power_Cron->import_csv('immediate') #1 wp-includes/class-wp-hook.php(288): SLP_Power_Cron->old_import_locations('import_csv', Array) #2 wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters('', Array) #3 wp-includes/plugin.php(544): WP_Hook->do_action(Array) #4 phar:///usr/local/bin/wp/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(293): do_action_ref_array('cron_csv_import', Array) #5 phar:///usr/local/bin/wp/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(262): Cron_Event_Command::run_ in /slp-power/include/module/cron/SLP_Power_Cron.php on line 35 Error: There has been a critical error on your website.Learn more about debugging in WordPress. There has been a critical error on your website. <div class="updated fade">Starting CSV import - duplicates update .</div> <div class="updated fade">1 data lines read from the CSV file.</div> <div class="updated fade">1 new locations added.</div>
March 30, 2020 at 11:31 AM #79094CiciKeymasterHi ,
What is this part of your csv file shown under identifier go to ?
10:45:22.0,3994832
Can you attach the actual csv file first row?
Identifier field : f you want to reference an external ID, one you’ve assigned or that comes from a source outside of Store Locator Plus, then you will want to Enable Contact Fields which provides a new data field called “Identifier”. This IS a location ID field that you can create/modify to be whatever you like to uniquely identify locations. It is often used to reference an external data source for imports.
it looks like you have a time stamp but I cannot tell which field header name it is under,,,,year established you have an actual date, which also looks like a time stamp.
If you provide as an attachment here a brief couple of lines of your csv file that would help
March 30, 2020 at 11:42 AM #79095D HParticipantAttached is the csv file..
Using the field “identifier” with our unique ID just as the instruction snippet says. It is not a timestamp; Just an ID number.
Contact Fields is enabled.
Using the field “year_established” (varchar 250) to store dates.
Attachments:
You must be logged in to view attached files.March 30, 2020 at 2:40 PM #79099CiciKeymasterI am going to confer with the developer to see what could be effecting your cron scheduled import.
The test did import successfully manually for me …albeit the “year established” is not the way I would normally see it with that much detail including the hour. (This is what imported into that field for me)
2020-03-20 10:55:49.0
April 9, 2020 at 8:34 AM #79138D HParticipantAny progress on this?
April 9, 2020 at 4:43 PM #79143CiciKeymasterYes, As far as the ID , I tested it and it imported correctly.
As far as the CRON
Developer found the Cron error on import — but he said that should not cause it to continually respawn.
Cron error will be patched in Power 5.5.3
April 9, 2020 at 4:43 PM #79144Lance ClevelandKeymasterThanks for the detailed error report.
The add_message() method call has been patched and will be out with Power 5.5.3 in the next week or less.
This should not be causing WP_Cron to respawn the import job every minute. Do you have other cron managers running in your WordPress stack?
April 14, 2020 at 2:12 AM #79152D HParticipantNo other cron managers running. The production site is running on WPEngine. The issue is happening there and in two other test setups on different environments. Furthermore, all the other cron jobs are running fine.
I included the add_message() debug info because every time the cron job fires, that message fills the log and it is marked Fatal then one is Critical.. Both of these would stop the script right? If so, perhaps the cron task cleanup never gets done. So each time the thing start up it spawns a new one.. Maybe?
Either way both these errors are Failures and should be important as they prevent Store Locator Power from doing one of its most important tasks.
We are still getting the multiple cron_csv_import jobs. It got over 100 and I had to delete them all.
April 20, 2020 at 7:59 AM #79194D HParticipantUpdated to 5.5.3 and the problem still exists..
| cron_csv_import | 2020-04-21 00:22:35 | 11 hours 57 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:37 | 11 hours 57 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:39 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:41 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:44 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:46 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:49 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:51 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:53 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:56 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:22:58 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:00 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:03 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:05 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:08 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:10 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:12 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:15 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:17 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:19 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:22 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:24 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:27 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:29 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:31 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:33 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:36 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:38 | 11 hours 58 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:41 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:43 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:46 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:48 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:50 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:52 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:55 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:57 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:23:59 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:24:02 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:24:05 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:24:07 | 11 hours 59 minutes | 12 hours | | cron_csv_import | 2020-04-21 00:24:10 | 11 hours 59 minutes | 12 hours | | wp_site_health_scheduled_check | 2020-04-21 16:44:51 | 1 day 4 hours | 1 week | +---------------------------------------------------+---------------------+-----------------------+---------------+ ~$ wp cron event list | grep -c "cron_csv_import" 122
April 20, 2020 at 12:26 PM #79196CiciKeymasterThanks for the info. Can you manually import?
The developer is working closely with a relief organization’s site at the moment so it may take him a little bit of time to get back to this. I am checking in with him on a regular basis
thank you for your patience.
April 29, 2020 at 12:04 PM #79240CiciKeymasterDH the developer is looking at your reported issue this week and will be patching or attempting to resolve and get to the bottom of it.
He has noted that the hourly job is rescheduling itself
April 30, 2020 at 1:10 PM #79243CiciKeymasterDan we sent you an email from support. The developer is working on the CRON issue you have identified and he can send you a beta version if you have a test, cloned or dev site you can install on
May 5, 2020 at 10:21 AM #79247D HParticipantHi – Yes, I would be happy to test the beta version on a test site.
May 5, 2020 at 12:19 PM #79248CiciKeymasterDan, I emailed a copy of the pre release beta Power 5.5.4. I can send it again if you did not receive it
-
AuthorPosts
- You must be logged in to reply to this topic.