All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

504 Gateway Time-out on MSM sites

marien 18 Jul 2015 11:02 problem, complete

I have a website with MSM that had two sites running with Low Variables without any issues. But while adding two additional sites, Low Variables for these new sites seems to be broken. I'm getting a 504 Gateway Time-out after 10 minutes when trying to access the module. On the first two websites Low Variables still seem to work properly.

One thing I noticed is that some of the copied variables (I think it was one field in both sites) from the first site had a suffix '-2'; like the name was not available, so it added a suffix to it. I think the time-outs started when removing these suffixes.

This issue is occurring on a live website, so I hope to get any help asap. Thanks!

Replies

  1. Low 19 Jul 2015 08:48

    I'm currently on holiday and it's the weekend. I'm checking support once a day.

    Did you copy over the variables using EE's MSM site-copy method? LV can't influence that, so maybe something chocked there. Also, LV won't add numeric suffixes to the vars, so it looks like something else did that.

    Is the front-end of the site working properly? And what are your EE, LV and PHP versions?

  2. marien 20 Jul 2015 04:37

    Yes, I copied the site using EE's MSM site-copy method. There was a gateway time-out then as well, so I think that's where something went wrong.

    The front-end is still working properly. The new sites aren't fully configured yet though, so I didn't test everything yet.

    I also contacted EllisLab about this, hope to hear from them today.

    EE 2.9.2, LV 2.5.0, PHP 5.4.41

  3. marien 20 Jul 2015 18:20

    I just got this update from EllisLab:

    Robin Sowell (ticket #85649):


    Hrm- it's definitely low variables running into an issue, but you may need to bring in Low for a fix.

    I poked around in the mcp.low_variables.php file to see what was going on (on site site_be) - if you look around line 260 you can see the experiments. This is the link where it stalls out:

     
    $var['variable_input'] = $OBJ->display_input($var['variable_id'], $var['variable_data'], $var['variable_settings']);


    I played around trying to identify which variables are causing the problem- it's these 4 on this site:

     
    $var['variable_id'] == 126 OR
    $var['variable_id'] == 97 OR
    $var['variable_id'] == 107 OR
    $var['variable_id'] == 111


    You can see where I have a conditional in there that's commented out- it skips those 4 variables. If you skip them- the page loads. It has php errors, but it loads. But if any those are in there, it hits a wall.

    But at that point, I just don't know the code well enough to have an idea as to why it's failing or how to fix it. You could start by taking a look at those variables and seeing if you can spot what's odd about them. But I just don't know Low variables well enough to say what might be going wrong.

  4. Low 20 Jul 2015 21:26

    For the variable IDs that were pointed out, what type are the variables? Can you change them to Textareas and see what happens?

  5. marien 21 Jul 2015 07:44

    They are all Playa fields. When I change them to textarea's, I just get the php errors, but no 500 error.

    A PHP Error was encountered 
    Severity: Notice
    Message: Undefined index: config
    Filename: wygwam/helper.php
    Line Number: 577
    --
    A PHP Error was encountered
    Severity: Notice
    Message: Undefined index: config
    Filename: wygwam/ft.wygwam.php
    Line Number: 527
    --
    A PHP Error was encountered
    Severity: Notice
    Message: Undefined index: config
    Filename: wygwam/ft.wygwam.php
    Line Number: 550
    --
    A PHP Error was encountered
    Severity: Notice
    Message: Undefined index: defer
    Filename: wygwam/ft.wygwam.php
    Line Number: 550
    --
    A PHP Error was encountered
    Severity: Notice
    Message: Undefined index: server_path
    Filename: low_select_files/vt.low_select_files.php
    Line Number: 181
    --
    A PHP Error was encountered
    Severity: Notice
    Message: Undefined index: allowed_types
    Filename: low_select_files/vt.low_select_files.php
    Line Number: 181

  6. Low 21 Jul 2015 09:16

    That looks like there is no config data for those vars. How about re-saving each of those Wygwam and Select Files vars settings? You could do the same for the Playa vars. Does that help?

  7. marien 21 Jul 2015 11:28

    That seems to solve it! For one site at least. But I think Robin Sowell can help me get the variable id's for the other site as well, so I can change them to textarea's and then edit those one by one (now I'm still getting the timeout on the other site).

    I used this for the initial change of field types:


    I guess that's what's caused the issue? Maybe that shouldn't be available for all fields? Or it should give fields some initial config data.

    Low 22 Jul 2015 08:27

    As you know, many vars (like fields) have settings. Just changing the field type there will not set any bespoke settings for the vars, just set them to the default. However, for 3rd party vars that use complex data (like Matrix or Playa), that might give you unexpected results. Most of the time, it should be fine, tho.

  8. marien 21 Jul 2015 15:26

    I'm afraid it's not solved yet. When I set the field types back to Playa, the timeout is back.

    The time-out is only occurring in groups that have one or more Playa fields. All groups without Playa fields load properly.

    The other fields are still fine after re-saving though (Wygwam, Select Files).

  9. Low 22 Jul 2015 08:26

    Hmm, how about deleting those Playa vars and recreating them?

    I think if the timeout occurs for Playa fields, it's either Playa or a combination of LV and Playa at play here.

  10. marien 24 Jul 2015 08:30

    When I add a new Playa field, it takes very long and then I get an error 500.

    When I view the group it's in in LV, I get a time-out.

    I can access the page "Manage variables", and I see the fields are saved.

  11. Low 24 Jul 2015 11:21

    I'll need to take a look myself. Please send SuperAdmin login and FTP credentials to hi at gotolow dot com if you can.

  12. marien 27 Jul 2015 08:38

    I just sent you the login details. Let me know if you need anything else.

  13. Low 27 Jul 2015 11:37

    It looks like Playa chokes when you show all entries from all sites (which is the default setting).

    Try adding some filters to the Playa var settings, limiting the entries to the site itself rather than all sites.

    Note that, technically, the timeout occurs in Playa, when LV calls the fieldtype to return the drag/drop panes interface, making this more a Playa issue than a LV issue.

    For now, you should be able to fix it by simply enabling some filters in the Playa settings.

  14. marien 28 Jul 2015 09:00

    That seems to work! Thanks!