Constantly getting 504 Gateway Timeout

Home Forums Calendar Products Event Aggregator Constantly getting 504 Gateway Timeout

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1138586
    Stefaan
    Participant

    Hi,

    Lately when importing events from Facebook, I am constantly seeing a 504 Gateway Timeout appear with the following message :

    Gateway Timeout

    The gateway did not receive a timely response from the upstream server or application.

    I do not know what happened, but I didn’t use to get that error in the past. It works fine when I only have four or five organizers / page Id’s in the box, but once I start adding more I keep getting that message. I didn’t know myself, but some organizers were getting in touch with me asking why their events didn’t appear on our calendar anymore.

    I checked with the helpful support folks at Siteground. And they got back to my report with the following information:

    I managed to recreate the issue on my end but it seems that your script reaches the default time out limit of the web server and we can not modify this setting per user basis since your account resides on a shared server:

    Code:
    [Thu Jun 30 16:14:32.625233 2016] [:warn] [pid 34641] [client XXXXXXXX] Timeout waiting for output from CGI script /XXXXXXXX/wp-admin/edit.php, referer: http://www.whiskywithfriends.be/wordpress/wp-admin/edit.php?post_type=tribe_events&page=events-importer
    [Thu Jun 30 16:14:32.625277 2016] [core:error] [pid 34641] [client XXXXXXXX] Script timed out before returning headers: edit.php, referer: XXXXXXXX/wp-admin/edit.php?post_type=tribe_events&page=events-importer

    I tried to increase the dynamic time out only for the particular script but the issue persists.

    In this case I would recommend you to discuss the issue with the plugin developer and import the desired content alternative means(FTP for example):

    https://www.siteground.com/tutorials/ftp/

    Please let us know in case we can assist you further.

    Best Regards,

    Vladimir Trandev
    Technical Support Team

    Is there any way I could fix this? Thanks a lot in advance,

    Stefaan

    • This topic was modified 7 years, 8 months ago by Stefaan. Reason: Removed some URL's and IP addresses
    #1139001
    Geoff B.
    Member

    Good evening Stefaan and welcome back!

    Thank you for reaching out to us.

    We are sorry to hear about the error messages you are receiving while trying to import Facebook events.
    I would love to help you with this topic.

    Typically, the 504 error message happens at the server level, not as part of the code itself. It’s either Facebook or your hosting provider that has the issue.

    By the looks of it the issue resides at your hosting provider and your shared hosting plan limits their ability to increase the timeout threshold for you.

    The easiest solution, from a technical point of view, would be to have a different hosting plan.
    Ideally one where you can control the timeout limits and with sufficient server power to handle the task at hand.

    Some kind of Virtual Private Server Plan or optimized WordPress hosting plan would completely fix this.

    That being said, I realize that this might not be an option for you.

    As such, I would like to see if we can’t tweak things on your current install and make sure that things run to their full potential.

    As a first step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?

    https://theeventscalendar.com/knowledgebase/sharing-sys-info/

    Finally, would you mind providing me with a couple of Facebook feeds that you are using so that I can run some tests ?

    Best regards,

    Geoff B.

    #1139176
    Stefaan
    Participant

    This reply is private.

    #1139482
    Geoff B.
    Member

    Good evening Stefaan,

    Thank you for writing back and for providing your system information.

    By the looks of it, there is unfortunately not much we can do about the rest of the setup (it’s pretty good).

    But, could you also provide me with your WordPress memory settings (as found in either your wp-config.php or php.ini file) ?

    The strange thing is … it used to work without all that much problems in the past I believe.

    I totally understand were you are coming from.
    This is unfortunately inherent to shared web hosting.

    Event with a good web host, what is happening is that there is a limited amount of server ressources available for everybody to share under such a plan. It’s a bit like sharing hot water for the shower when living with several roommates.

    If one of your web server’s roommates uses a lot of ressources, if there is a growing number of roommates or even if there are peak usage time, the result is the same: less ressources for you to use. This will cause timeouts, slower sites, etc…

    Furthermore (and I don’t claim that this is the case of your web host), I have personally seen several cases where web hosts oversell their shared hosting plans with results you can imagine.

    Best regards,

    Geoff B.

    #1139606
    Stefaan
    Participant

    This reply is private.

    #1140022
    Geoff B.
    Member

    Good evening Stefaan,

    I totally understand where you are coming from.
    For the record, there are a lot of options out there for pretty powerful web hosting plans around the $15 – $20 /month price range.

    I want to reiterate that it’s a shame that you are not able to tweak the timeout setting with that specific webhost (which otherwise looks great).

    I did ask for a second opinion on this one to the other members on my team (in case I am missing something).

    In the meantime, as requested previously, would you mind providing me with a couple of Facebook feeds that you are using so that I can run some tests (just to be extra sure that the cause is not elsewhere) ?

    Best regards,

    Geoff B.

    #1140279
    Stefaan
    Participant

    This reply is private.

    #1140574
    Geoff B.
    Member

    Good afternoon Stefan,

    Thank you for writing back and for giving me the list of feeds.
    This allowed me to run some tests.

    Since there are not that many events available right now and that several of these feeds are actually blocked by restrictions from being imported in North America.

    So at best, my tests are inconclusive since they are not representative of the real amount of events you are importing at the same time.

    Also, as promised, I did ask for a second opinion on this one.
    Our top Dev programmer did say that this sometimes can happen when a very large amount of events are being imported at the same time on certain server configurations.

    As a short term workaround, he suggests turning off the auto-import and trying to import fewer events manually.

    If you have any suggestions on good hosting, I would be happy to check it out. Been a SiteGround customer for a decade now and always have been happy with them (especially the support).

    I totally understand that you don’t want to leave a long time webhost. Especially if you had so far.

    In fact, if I were in your shoes, I would actually run that fact by them. Perhaps you could get some kind of discounted Hosting upgrade. You never know.

    As far as good webhosts unfortunately, most of my preferred webhosts are North American (I personally am a big fan of Media Temple and WP Engine).

    Let me know how that goes.

    Best regards,
    Geoff B.

     

    #1148622
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Constantly getting 504 Gateway Timeout’ is closed to new replies.