Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mindshare Labs, Inc.

    (@mindshare)

    With nginx that’s definitely an out of memory error. However the issue shouldn’t matter between plugins versions… The changes in the latest version shouldn’t effect memory usage. If you have any more info that might help let us know.

    Thread Starter scott9s

    (@scott9s)

    I don’t think I was out of memory. I’ll look at the memory deeper.

    The issue happen all the time in Firefox
    On Safari, the problem did not occur at all.
    On Internet Explorer, the problem occurred sometimes. Frequent enough to notice.
    Google Chrome, rarely received the 502 bad gateway, but sometimes it did happen.

    What else would you like to know?

    Plugin Author Mindshare Labs, Inc.

    (@mindshare)

    The 502 error is not related to our plugin specifically… It’s usually a memory issue or misconfiguration with nginx. If you do not have any specific steps we can take to duplicate the error, we cannot troubleshoot it. How much RAM does your nginx ghost have?

    Thread Starter scott9s

    (@scott9s)

    I have 6 CPU cores & 8 GB of RAM, I am using only ? of the RAM, and php-fpm has plenty of RAM. Each pool item in my php-fpm pool uses about 70 MB and I have about 20 as minimum in the pool. max 70.

    6 nginx worker processors

    I don’t think I’m running out of RAM.

    Now, I don’t doubt it could be a misconfiguration of nginx. But I have had three different people look at my configuration.

    The solution of dropping your plugin down to previous version fixes it for me.

    hmm. steps for you to duplicate it. I’ll have to think how I can get you to do that. Let me look at my code.

    Plugin Author Mindshare Labs, Inc.

    (@mindshare)

    Thread Starter scott9s

    (@scott9s)

    Wow. Nice response. I was trying to help with the plugin. and you give me a response like this:

    Mindshare Studios, Inc. wrote:
    Whoa! I guess since you’re so smart you should be able to figure it out yourself!

    If I seem frustrated in my responses, I apologize. I just spent a week’s worth of time debugging my site looking at my nginx configuration and my php-fpm configuration. Thinking the same thing as you: that my server must be using its memory resources improperly.

    I disabled the latest version of this plugin, and bad gateway errors go away. I enable the latest version of this plugin, the bad gateway errors come back.

    Now, it could be my code that relies on your plugin that is causing errors.

    Here’s my code:

    <?php 
    
    function svg_blog() {
      if(is_ie() && get_browser_version() <= 8) {
        $icon = '<img src="'.SVG_URL.'blog.png" alt="Blog Icon" class="icon icon-blog" />';
      } else  {
        $icon = '<svg xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 58.2 56.5" enable-background="new 0 0 58.2 56.5" xml:space="preserve" class="icon icon-blog"><path d="M29.6 54.8C14.9 54.8 3 42.9 3 28.2s12-26.7 26.7-26.7c14.7 0 26.7 12 26.7 26.7S44.3 54.8 29.6 54.8z M29.6 3C15.8 3 4.5 14.3 4.5 28.2s11.3 25.2 25.2 25.2c13.9 0 25.2-11.3 25.2-25.2S43.5 3 29.6 3z" class="style0"/><path d="M42.1 44.8h-25c-0.9 0-1.7-0.8-1.7-1.7V13.3c0-0.9 0.8-1.7 1.7-1.7H34l9.9 9.8V43 C43.9 44 43.1 44.8 42.1 44.8z M17.1 13.1c-0.1 0-0.2 0.1-0.2 0.2V43c0 0.1 0.1 0.2 0.2 0.2h25c0.1 0 0.2-0.1 0.2-0.2v-21l-9-9H17.1 z" class="style0"/><path d="M43.2 22h-8.3c-0.9 0-1.6-0.7-1.6-1.6v-8.3L43.2 22z M34.8 15.6v4.8c0 0.1 0 0.1 0.1 0.1h4.8L34.8 15.6z" class="style0"/><path d="M26.8 23.7h-8.2v-8.9h8.2V23.7z M20.2 22.2h5.2v-5.9h-5.2V22.2z" class="style0"/><rect x="27.5" y="15.9" width="5.1" height="1.5" class="style0"/><rect x="27.5" y="20.7" width="5.1" height="1.5" class="style0"/><rect x="18.3" y="30.2" width="22.4" height="1.5" class="style0"/><rect x="18.4" y="25.4" width="22.4" height="1.5" class="style0"/><rect x="18.3" y="34.9" width="22.4" height="1.5" class="style0"/><rect x="18.3" y="39.7" width="22.4" height="1.5" class="style0"/></svg>';
      }
      return $icon;
    }

    I then call that function: svg_blog() in my theme anywhere I want that icon.

    function sf_icon_func( $atts ) {
    	extract( shortcode_atts( array(
    		'icon' => ''
    	), $atts ) );
    
      if($icon == 'blog') {
        return svg_blog();
    }
    }
    add_shortcode( 'svgicon', 'sf_icon_func' );

    Again, this worked great in the previous version of the plugin. But, the latest version, in FireFox and IE, it had issues. Chrome had some issues, but not as much, and Safari had No issues.

    I have not dug into the plugin code. I was just trying to help. I always feel that Open Source code and plugins will work better when people using them and involved try to help each other out.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bad Gateway Errors using 3.1.3 on Firefox and IE’ is closed to new replies.