Announcement

Collapse
No announcement yet.

Server Config question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Server Config question

    Isn't it possible that incorrect DNS Zone settings could cause Gateway Timeout errors? And, it doesn't mean it's an all or nothing? IOW, the DNS could be mostly be configured correctly so you had access to the web site, but a single erroneous entry could cause an upstream(or where ever) server to not respond in time?

    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    Re: Server Config question

    No, that would never cause that issue. A gateway timeout error means the address the application (any application) is trying to talk to was successfully resolved, a connection open attempt made, and either the attempt was never explicitly rejected (such as when a remote server is down), or the connection was accepted but no response came before the pre-configured timeout period.

    If the gateway in question is something a MivaScript is trying to talk to via MvCALL, then you'd get a host not found error if DNS intermittently failed while trying to resolve the remote server name. If the gateway in question is an nginx error while trying to browse a website, then it means the back end application did not respond before the timeout. For example, if you tried to delete baskets in a store that has several million expired and inventory active, chances are you'll get an nginx timeout before Miva Merchant, and thus Apache, return the response to nginx on the front end, so it gives up and produces the error.
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      Re: Server Config question

      Thanks David.

      What are the possibilities if the Mivascript in question is not using a MvCall and inside of Miva admin? Only "external" I can see in this scenario is making a query to the mysql db tables.

      Scott
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #4
        Re: Server Config question

        I'll need to know the exact error message; i.e. everything on the screen. Is it a Miva Merchant-generated error, nginx error, browser error, etc.
        David Hubbard
        CIO
        Miva
        [email protected]
        http://www.miva.com

        Comment


          #5
          Re: Server Config question

          gatewayto.jpg

          I hope you can see the img.

          This is another host server, in admin connected https, when trying to save the current framework.

          Scott
          Need to offer Shipping Insurance?
          Interactive Design Solutions https://www.myids.net
          MivaMerchant Business Partner | Certified MivaMerchant Web Developer
          Competitive Rates, Custom Modules and Integrations, Store Integration
          AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
          My T-shirt Collection is mostly MivaCon T-shirts!!

          Comment


            #6
            Re: Server Config question

            Ah, okay in this case, there's a front end web server that's acting as a reverse proxy. Basically requests come in to it, and it sends requests it cannot handle itself to some back end web server that's normally invisible to you while interfacing with the site. We use nginx in that same role so it can handle static content while passing dynamic requests back to apache, for example.

            What's occurring is the gateway / front end server is set with a timeout that is shorter than the request you're trying to run is taking, so it eventually gives up waiting and gives you that error message. The fix will be to have the host lengthen that timeout value. If you're trying to export a framework, it may require a few minutes. If they lengthen that timeout and you instead start getting a Miva Empresa error about globaltimeout exceeded, then the next timeout that will need increasing is in the Miva Empresa engine config, which may be a text file accessible to you that you can adjust yourself. That would only be necessary if you reach that as an additional issue.
            David Hubbard
            CIO
            Miva
            [email protected]
            http://www.miva.com

            Comment


              #7
              Re: Server Config question

              Thanks David and that all makes sense to me.

              Per some info from MarkH @ Vermont Gear, I deselected this component:
              CSSUI Product/Category Header & Footer

              And no longer get the GTO when saving the framework. The data from this module being collected (or not) is a bottleneck somehow.

              Also I was thinking the same gateway error I was getting while rendering a page template in the store(not admin) was the same issue. There was also a third issue (now resolved) that I decided were all the same issue. The page template render seemed to be resolved when I applied the DNS Zone changes that had been pending. The ISP also increased some timeouts too -- I didn't know they did that or when it happened.

              Is there a specific timeout I should change (or request if I don't have access, it's a VDS) before having Miva Engine config change?

              Here the timeouts that were increased:

              /etc/httpd/conf/httpd.conf
              Increased Timeout from 60 to 120

              /etc/httpd/conf.d/fcgid.conf
              Increased FcgidIdleTimeout from 60 to 90
              Increased FcgidConnectTimeout from 45 to 60
              Increased FcgidIOTimeout from 60 to 90

              /etc/php.ini
              Increased default_socket_timeout from 60 to 90
              Increasd mysql.connect_timeout from 60 to 90

              Thanks,

              Scott
              Need to offer Shipping Insurance?
              Interactive Design Solutions https://www.myids.net
              MivaMerchant Business Partner | Certified MivaMerchant Web Developer
              Competitive Rates, Custom Modules and Integrations, Store Integration
              AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
              My T-shirt Collection is mostly MivaCon T-shirts!!

              Comment


                #8
                Re: Server Config question

                Originally posted by ids View Post
                Is there a specific timeout I should change (or request if I don't have access, it's a VDS) before having Miva Engine config change?

                Here the timeouts that were increased:

                /etc/httpd/conf/httpd.conf
                Increased Timeout from 60 to 120

                /etc/httpd/conf.d/fcgid.conf
                Increased FcgidIdleTimeout from 60 to 90
                Increased FcgidConnectTimeout from 45 to 60
                Increased FcgidIOTimeout from 60 to 90

                /etc/php.ini
                Increased default_socket_timeout from 60 to 90
                Increasd mysql.connect_timeout from 60 to 90

                Thanks,

                Scott

                The Timeout value in Apache is typically sufficient. Ideally you want it to be a second or two higher than the globaltimeout value in the Miva Empresa engine, so that if Empresa does time out, you still see the error message it generates. The FastCGI and php changes would not be necessary for this particular issue because that would only affect long running php scripts (when php is running as a FastCGI). There wouldn't be any php code involved in Merchant exporting a framework or admin activities.

                Now, there may an additional parameter that needs to be tuned on the proxy server if there is indeed a reverse proxy in front of the back end web server running Merchant. That would be ProxyTimeout if it's an apache reverse proxy. By default, it takes the same value as Timeout, so if that server has had its Timeout adjusted, then ProxyTimeout is fine unless it's been explicitly defined.
                David Hubbard
                CIO
                Miva
                [email protected]
                http://www.miva.com

                Comment

                Working...
                X