Avada Forums Community Forum 502 on Menu updates – Avada taking too long to make requests

Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • teamsportsplanet
    Participant
    Post count: 5

    Hello,

    When I go to save a new link in our main site menu and hit ‘save’ it keeps taking too long with the request and timing out and giving a 502 error. I reached out to our host (WPEngine) and they suggested that the issue was coming from the large amount of requests within the Avada theme.

    I have attached their response below:

    “Hi Nina,
    I’ve run some further investigation into the 502 errors that you’re seeing when saving menus, but so far I haven’t been able to directly replicate the issue in the staging site.

    When I went into the Appearance -> Menus area on the staging site and saved the menu there I did see that it took a bit longer than expected to complete, but it didn’t give me a 502 error.

    In a second test though I ran a trace on the saving process to see if I could identify anything that stuck out as potentially problematic. In that trace I found two items of potential concern which were as follows:

    • The theme file at /nas/content/staging/teamsports/wp-content/themes/Avada/includes/class-avada-megamenu.php was called 337 times during the save. This is pretty large amount of calls being made for just a single save request and seems to be the biggest contributor to the 502/timeout error that you’re seeing.

    • The following files from the omega-instant-search plugin were called 180 times in total:
    81 /nas/content/staging/teamsports/wp-content/plugins/omega-instant-search/src/Api/Indexer.php:72
    63 /nas/content/staging/teamsports/wp-content/plugins/omega-instant-search/src/Api/Indexer.php:239
    36 /nas/content/staging/teamsports/wp-content/plugins/omega-instant-search/src/Entity/Post.php:80

    This second item is more normal, but could be contributing to the problem overall.
    For some additional context, 502 errors happen on our platform when a process runs for longer than 60 seconds. Processes that run that long end up getting killed by the server in order to help prevent server resource issues, and that termination of the process leads to the 502 error.

    What seems to be happening here is that the Avada theme is making a large amount of requests, and these in conjunction with the requests being made by plugins (mainly the omega-instant-search one in this case) seem to be causing the menu saving process to hit that 60 second run limit.

    With this in mind, our recommendation for fully resolving things would be to try and reduce the amount of requests that the Avada theme is making specifically since that appears to be the biggest contributor to the issue. For that you may need to optimize the theme code, and the theme developer or a general web developer may be able to better assist in that regard.

    I hope this helps out, and definitely let us know if you need any further assistance on things!”

    Michael
    Keymaster
    Post count: 667

    Hi @teamsportsplanet

    Our team has replied to your support ticket and requested access credentials to investigate this, please check your email inbox for our reply. What should of have been checked and tested first hand was disabling the 3rd party plugins to verify the number of requests, something that we do not see with Avada when testing so something else is at play there.

    Going forward, if you have valid support and have created a support ticket please do not double post here, our team does not provide support via the community forum and it can lead to confusion and miscommunication.

    Thank you kindly

    bigsalami
    Participant
    Post count: 1

    Any update on this? I’m running a standard megamenu (with 5 drop-downs, each with 3 columns and around 40 links total). Nothing custom and no additional plugin integrations – just Avada + WordPress, and I’m getting 504 gateway timeouts each time I hit save now – I’m on a CRAZY beefy hosting environment, but looking at the post, this is a DOOZY of a bunch of unnecessary variables and processing.

    Whenever I hit save now, the script times out and when I reload the menu, the items that were towards the bottom are all missing.

    My question – will you making this functionality more efficient in the future? This is a requirement from all my clients, and I don’t care if it’s WordPress menu or your own, as long as it works – I love the functionality, and the editing interface (in Menus) is fine, however not being able to save the menu is a HUGE problem. Please advise.

    On each menu save, duplicate variable sets are posted which seems a bit excessive:

    {
        "name": "menu-item-title[48614]",
        "value": "Events"
    }, {
        "name": "menu-item-attr-title[48614]",
        "value": ""
    }, {
        "name": "menu-item-classes[48614]",
        "value": ""
    }, {
        "name": "menu-item-xfn[48614]",
        "value": ""
    }, {
        "name": "menu-item-description[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-style[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-icon[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-icononly[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-highlight-label[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-highlight-label-background[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-highlight-label-color[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-highlight-label-border-color[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-modal[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-background-image[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-background-image-id[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-status[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-thumbnail[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-thumbnail-id[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-width[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-columns[48614]",
        "value": "auto"
    }, {
        "name": "menu-item-fusion-megamenu-columnwidth[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-title[48614]",
        "value": ""
    }, {
        "name": "menu-item-fusion-megamenu-widgetarea[48614]",
        "value": "0"
    }, {
        "name": "menu-item-db-id[48614]",
        "value": "48614"
    }, {
        "name": "menu-item-object-id[48614]",
        "value": "47819"
    }, {
        "name": "menu-item-object[48614]",
        "value": "page"
    }, {
        "name": "menu-item-parent-id[48614]",
        "value": "0"
    }, {
        "name": "menu-item-position[48614]",
        "value": "31"
    }, {
        "name": "menu-item-type[48614]",
        "value": "post_type"
    }

    and then posting it again as a separate variables:

    menu-item-title[48614]: Events
    menu-item-attr-title[48614]: 
    menu-item-classes[48614]: 
    menu-item-xfn[48614]: 
    menu-item-description[48614]: 
    menu-item-fusion-megamenu-style[48614]: 
    menu-item-fusion-megamenu-icon[48614]: 
    menu-item-fusion-megamenu-icononly[48614]: 
    menu-item-fusion-megamenu-highlight-label[48614]: 
    menu-item-fusion-megamenu-highlight-label-background[48614]: 
    menu-item-fusion-megamenu-highlight-label-color[48614]: 
    menu-item-fusion-megamenu-highlight-label-border-color[48614]: 
    menu-item-fusion-megamenu-modal[48614]: 
    menu-item-fusion-megamenu-background-image[48614]: 
    menu-item-fusion-megamenu-background-image-id[48614]: 
    menu-item-fusion-megamenu-status[48614]: 
    menu-item-fusion-megamenu-thumbnail[48614]: 
    menu-item-fusion-megamenu-thumbnail-id[48614]: 
    menu-item-fusion-megamenu-width[48614]: 
    menu-item-fusion-megamenu-columns[48614]: auto
    menu-item-fusion-megamenu-columnwidth[48614]: 
    menu-item-fusion-megamenu-title[48614]: 
    menu-item-fusion-megamenu-widgetarea[48614]: 0
    menu-item-db-id[48614]: 48614
    menu-item-object-id[48614]: 47819
    menu-item-object[48614]: page
    menu-item-parent-id[48614]: 0
    menu-item-position[48614]: 31
    menu-item-type[48614]: post_type

    This post is enormous and processes for far too long – please troubleshoot your megamenu system and make it more efficient if you can.

    Any advice / common troubleshooting procedures would be appreciated (for the community as well to improve this answer).

    FYI, my max_input_vars is at 5000 already, script execution set for 120 seconds, post_max is at 64MB (plenty), and memory at 768MB – I can’t up this any more than I already have.

    I look forward to your response.

    Ammar. S
    Keymaster
    Post count: 2149

    Hello @Bigsalami

    We will gladly check and assist you with this issue, however please note that community forum is not meant for support and we do not check this often, you have a valid support and should be able to open a support ticket with us without any issues.

    Click Here To Create An Account & Get Avada Support

    Thanks

    -Ammar

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.