Operation times out cont'd…

This topic contains 8 replies, has 2 voices, and was last updated by  Jacob Perl 9 years, 3 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #14618

    In reply to: http://wp-event-organiser.com/forums/topic/operation-times-out-at-only-10-seconds/

    Thanks Stephen, this is initially what I had thought as well, but in the exact same server environment (WPEngine), the other plugin I mentioned is allowed to take much more than 10 seconds to complete this operation…odd.

    Jacob Perl
    #14621

    Hi Jacob, sorry – that old thread was closed by mistake.

    In all likelihood the other plugin is requesting more time.

    Stephen Harris
    #14623

    Makes sense…so, any way I can make yours do the same?

    • This reply was modified 9 years, 3 months ago by  Jacob Perl.
    Jacob Perl
    #14626

    Yup, as mentioned in the previous thread, I’ll be releasing an update shortly 😉

    Stephen Harris
    #14672

    No worries…I just didn’t know how long “shortly” would mean in your previous post, but I see now that you really meant it! Thank you for responding with the update so quickly! Looking forward to trying it out.

    Jacob Perl
    #14674

    It’s my pleasure – if the problem persists, please let me know. It now resets the timeout for 10 minutes for each feed to be imported. This should be ample time to import most feeds.

    Stephen Harris
    #14684

    Finally got a chance to try it out…and it is still timing out at 10 seconds.

    Jacob Perl
    #14689

    Hi Jacob,

    My apologies, I’ve dug a bit more into this, and I’ve realised that the time-out error was coming form Curl. So the remote request (to fetch the feed) was taking more than >10s, which is the default time out.

    I found that the feed you linked to took between 12-15 seconds to fetch. And then a further 40-50 seconds to process. (The latter time will vary greatly depending on your set up).

    I’ll account for this in the next update, but the change is simple. On line 250-251 of ical-functions.php (iCal extension) there is the following:

    $ical = new EO_ICAL_Parser();
    $response = $ical->parse( $source );
    

    Simply set $ical->remote_timeout before calling EO_ICAL_Parser::parse:

    $ical = new EO_ICAL_Parser();
    $ical->remote_timeout = 600;
    $response = $ical->parse( $source );
    

    If you’d like me to send you the updated extension, then I can do so. But in the absence of a significant/important changes, I shall probably wait a week before releasing 2.0.1

    Stephen Harris
    #14691

    Thank you..I have no problem hacking the code in the meantime.

    Jacob Perl
Viewing 9 posts - 1 through 9 (of 9 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.