How can I stop a hung Events Import job?

Home Forums Calendar Products Event Aggregator How can I stop a hung Events Import job?

Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • #1542357
    Mark Evilsizor
    Participant

    I am using The Events Calendar and I have just installed the Event Aggregator license. I am running WP Multisite. I setup a new import from 1 site to another in my network. The preview worked fine, it showed 2 events to be imported. But the import has now been running for 23 minutes. How can I stop this job?

    I have tried
    – Deleting the scheduled import job
    – Restarting Apache
    – Rebooting the server

    It still reports that my import is currently in progress. and Apache is eating up nearly 100% of my CPU and it is harming the performance of all of the sites on our network.

    ========================
    PLEASE LEAVE FOR SUPPORT
    Reporting the same issue as: https://theeventscalendar.com/support/forums/topic/events-import-stuck/

    #1542391
    Mark Evilsizor
    Participant

    I came to believe that the WP Cron was the key to trying to kill this job. I tried
    – Renaming the option_name field value from _transient_doing_cron to _transient_doing_cronX
    – Installing the WP Control plugin and deleting the following 3 WP Cron entries
    o tribe aggregator
    o tribe_queue_ea_import_events_cron
    o tribe_aggregator_process_insert_records
    I did not restart apache after this and perhaps I should have. But deleting the cron jobs did not kill the job, I continued to see the stuck process

    So I used Updraft Plus to restore this one site, and all plugins across the network to earlier today. This returned The Events Calendar to the state it was in prior to installing the Aggregator license key. And it restored this one site’s options table. This effectively killed the job and my sites are now functioning properly.

    I am still wanting support for
    1.) How to properly kill an import job if it runs amuck
    2.) How to properly enable 1 WPMU site to aggregate events from another WPMU site on the same network. As stated above the preview worked perfectly, but the actual import just hung. One item which I wonder if it was the problem is that the parameter defaulted in http:// in front of the site I entered, but my sites are all https:// now. The preview still worked but maybe this loused up the actual import job?

    #1543184
    Sky
    Keymaster

    Hi Mark!

    Thanks for reaching out to us and the detailed report. I have seen a few instances of this pop up today, and am trying to track down the issue and how an import job can be cancelled when something goes wrong like this.

    Can you share the file or URL that you were trying import when this happened?

    Thanks,
    Sky

    #1543235
    Mark Evilsizor
    Participant

    I initially entered: http://www.lindahall.org/events

    When I looked back into the settings it had changed it to http://www.lindahall.org/events
    But most accurately it should be: https://www.lindahall.org/events

    Thanks,
    Mark

    #1544202
    Sky
    Keymaster

    Mark,

    Thanks for providing the link. I was able to import the events from that url without issue.

    Do you have a staging site set up? I would recommend trying the import with the Twenty Seventeen theme enabled and all other plugins disabled to see if it behaves any differently. You can read more about this troubleshooting process here: https://theeventscalendar.com/knowledgebase/testing-for-conflicts/

    I had another customer try deleting their transients using this plugin: https://wordpress.org/plugins/artiss-transient-cleaner/ and they reported that it did indeed stop the import from running.

    Let me know if you are able to test this out on a staging server with the default theme.

    Thanks,
    Sky

    #1544362
    Mark Evilsizor
    Participant

    This reply is private.

    #1544364
    Mark Evilsizor
    Participant

    This reply is private.

    #1544371
    Mark Evilsizor
    Participant

    This reply is private.

    #1545646
    Sky
    Keymaster

    Hi Mark,

    Both the http and https versions of the link you provided work fine for me. I tried to recreate your scenario on a multisite, and pull in events from another site in the multisite. However, this doesn’t work at all for me, and I get an error before even previewing. Although, I’m guessing this is because my multisite install is on my local machine, and the aggregator service can’t reach it.

    I will have to ask around to see if anyone has a MU set up online that we could test to make sure this works between two sites on the same multisite network. Please note that the site to site feature of Aggregator is still considered “beta” right now, and I’m not sure it supports this particular use case yet.

    I’ll let you know when I hear anything back.

    Thanks,
    Sky

    #1545871
    Mark Evilsizor
    Participant

    When I was doing my testing on 6/1/2018 the client and the server were both on 4.6.17. Now both are on 4.6.18.

    Also as I have been trying it on the test server, I have used 1 site in an MU WP network as the client while the server was https://www.lindahall.org – i.e. 1 site on a different WPMU network.

    When I do a preview now, it is showing all the events from https://www.lindahall.org rather than only showing events from the selected date forward. So that set of events to import would be 177. And even though I clicked preview, it actually did bring the whole 177 in. Some thoughts on this

    1.) May be the TEC 4.6.18 fixed the hanging problem?
    2.) A little disturbing that clicking the Previous button seemed to effect a run
    3.) Appears to be a bug that it did not respect the Events on or after date
    4.) It did create all of those events, which is an improvement, but it did not bring in their media. Can you try this with 1 site of a multisite network as the client and using our site, https://www.lindahall.org as the server? In my testing on Friday, when once event was ingested, the media was not. Perhaps with a multisite client it is not bringing in or writing the media records to the right place or at all?

    Thanks for your help,
    Mark

    #1545899
    Mark Evilsizor
    Participant

    Subsequent to the preview/import I have just clicked Run Import from the scheduled imports tab and it does run and the fuel bar churns through the records and ends appropriately. But

    – It said it updated 177 even though no records were changed on the source
    – It did not bring in the media
    – It does not appear to be respecting the Events On or After setting

    Mark

    #1546568
    Sky
    Keymaster

    Hi again,

    I’m glad you were able to finally get the import to complete properly. Let’s try to figure out the rest of the issues you are experiencing.

    Very strange that you are seeing 177 events show up! Can you tell me what you have set in Events > Settings > Imports > “Global Import Settings” and also “Other URL Import Settings?” Screenshots would probably be the best way to show these settings.

    For “Other URL Import Settings”, the max chunk of time you can import is three months. I tried the import with various starting dates in the “on or after” date field, and it always respects whatever timeframe is set in the Events Settings. I even tried setting this a year ago, and it only imported 3 months worth of events from that date.

    Can you also tell me what you are entering for the “on or after” date when you see all 177 events show up? And, are these events all in the future, or are there past events included in that number?

    Regarding the featured images, I am not seeing any of them pulled in. I do most of my testing on an MU site, and the featured images are usually pulled in without any issues. Are you using any kind of CDN like Cloudflare on the site the images are being pulled from?

    Can you explain in more detail what you mean by “clicking the Previous button seemed to effect a run?” Do you mean your browser’s “back” button? I tried this in Chrome/Mac and it does not restart the import when hitting “back” for me. It starts at the beginning with “select import type.”

    Thanks!
    Sky

    #1546602
    Mark Evilsizor
    Participant

    Sounds good Sky, I have enumerated your questions and answered them below

    1.) Can you tell me what you have set in Events > Settings > Imports > “Global Import Settings” and also “Other URL Import Settings?”
    See attached images regarding settings

    2.) I tried the import with various starting dates in the “on or after” date field, and it always respects whatever timeframe is set in the Events Settings. I even tried setting this a year ago, and it only imported 3 months worth of events from that date.
    See attached image regarding import history

    3.) Can you also tell me what you are entering for the “on or after” date when you see all 177 events show up? And, are these events all in the future, or are there past events included in that number?
    June 1, 2018 – see import details image attached
    Most of the events are in the past, basically it ingested (and tries to update) all our past events, and future events within the next 3 months

    4.) Regarding the featured images, I am not seeing any of them pulled in. I do most of my testing on an MU site, and the featured images are usually pulled in without any issues. Are you using any kind of CDN like Cloudflare on the site the images are being pulled from?
    I also did not ingest any of the images from the client
    We do not have any CDN, we do use a cache
    The URL seem normal to me: https://www.lindahall.org/wp-content/uploads/sites/5/2018/05/QC517-A49-1804-pl-4-4-300×135.jpg.
    I am able to CURL it on the client (our client and server are Linux)
    I am able to click on a link and see the image on my phone (outside our network)
    Perhaps the aggregator software is thrown by the https protocol?
    Perhaps something in our media name is unusual?

    5.) Can you explain in more detail what you mean by “clicking the Previous button seemed to effect a run?” Do you mean your browser’s “back” button? I tried this in Chrome/Mac and it does not restart the import when hitting “back” for me. It starts at the beginning with “select import type.”
    I mistyped. I meant that when I clicked the Preview button, it not only did a preview, it actually ingested all 177 events.

    Mark

    #1546728
    Sky
    Keymaster

    Mark,

    Thank you for providing the screenshots and other information.

    For 1-3:

    I’m wondering if the saved imports don’t somehow work since an update to the plugin. Can you try deleting the scheduled import, and first try as a “one time import” to see if it makes a difference? If it respects the date range doing that, try setting up and saving a new scheduled import with the same parameters and see if it still behaves properly the next time it is triggered.

    4:
    I can see the image you linked in the browser, but inspecting the http headers, I’m seeing some weirdness

    5:
    Clicking “preview” should not trigger the import, however clicking the “save changes” or “save scheduled import” below will trigger it to run immediately. It is also possible that the second button was selected and you hit enter or return. The other cause of this I can think of would be since the event was scheduled, the cron won’t run until your site is visited to trigger it, so maybe the preview triggered the cron? If none of the above and you can reproduce this, I would like to see a screencast of this happening, if possible.

    Let me know how it goes with recreating the imports.

    Thanks,
    Sky

    #1546764
    Mark Evilsizor
    Participant

    It will take me a little bit to setup the test for 1-3, so I am responding to the image issue first.

    I tried 3 different HTTP/HTTPS header checkers on the Internet and they came up clean for the image you listed and another one. I thought maybe we had a permission issue from inside/outside our network but that does not appear to be the case. See images attached. But this does seem like an interesting thread, perhaps your website is requesting these images from us in some unexpected way which is provoking our Apache server to give a 403? I was unable to recreate it, but I am willing to check Apache configuration details if you believe there may be a problem there.

    If you try CURL or WGET do you get the same result?
    I do see some differences in the header you show and what I saw from the testing sites, but I am not sure what they mean.

    Mark

Viewing 15 posts - 1 through 15 (of 39 total)
  • The topic ‘How can I stop a hung Events Import job?’ is closed to new replies.