We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19488
    • 5 Posts
    I am actually having a few problems which I don’t know are version specific.

    1) After login of MODx manager I get a non-existing page error which is using a host provided error page.

    2) When I go back to the manager directory I then get failed connection errors (exceed max user connections) and then various other parse errors which I suspect are related to the failed connection.

    I have been removing the @ symbol from as much of the manager php scripts I can find so I could attempt to debug this. I don’t really know php/mysql very well.

    Hosting details the provider gives are (may not be accurate except for MySQL) :

    Apache version 2.2.10(Unix)
    PHP 5.2
    MySql 5.0.67-community

    Any help would be appreciated.

    Thanks
      • 26903
      • 1,336 Posts
      1) After login of MODx manager I get a non-existing page error which is using a host provided error page.
      Does your host run a tomcat server by any chance? This is known to interfere with access to the manager. Other than that when you navigate to the manager page what errors do you get in your apache error log?

      When I go back to the manager directory I then get failed connection errors (exceed max user connections)
      This is a mysql setting, not MODx, did your installation complete OK and has the site ever worked or not?
        Use MODx, or the cat gets it!
        • 19488
        • 5 Posts
        Unfortunately, I don’t have access to the logs and I don’t think it’s a tomcat server but I really don’t know that either.

        The parse and other errors I get seem to be related to the sql server.

        I just have the impression that MODx by the manner that it executes code is not keeping good track of when the sql server has been connected and is trying to open a new connection more often than it needs to. That may work fine when the max user connections aren’t set to a low value but with my provider they limit it to 2. (I am using a free account so they rarely give any support.)

          • 26903
          • 1,336 Posts
          I just have the impression that MODx by the manner that it executes code is not keeping good track of when the sql server has been connected and is trying to open a new connection more often than it needs to. That may work fine when the max user connections aren’t set to a low value but with my provider they limit it to 2

          MODx only uses one persistant connection I believe, with a limit of 2 I’d be surprised if you can do anything at all of any use, from MYSQL 5.1.15 the default is 151 if you are using it with apache.

          When I get a mo I’ll set my max_connections to 2 on one of my test boxes and see what happens.
            Use MODx, or the cat gets it!
            • 19488
            • 5 Posts
            It’s not the total connections variable which is set at 200 it is the max connections per user that is set to 2. (I don’t recall the name of it off hand.)

            I am assuming that there is a global level with Apache/PHP that you can create/set a value to the database connection handle (ie. php calls the mysql link I believe.)

            My knowledge is more on the ASP.NET(VB.NET)/IIS side than PHP(c++)/Apache/Linux side.
              • 33372
              • 1,611 Posts
              I don’t know this for a fact, but I wouldn’t be surprised if two connections were routinely made when in the manager (one for the manager itself, and one that shows page previews in an iframe when editing a page. Plus I would think that "nobody" would be the PHP user if it’s being run as an Apache service, so any two people viewing the site at the same time would use two connections. All of which just makes me think that’s WAY too restrictive a limit...
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                • 19488
                • 5 Posts
                What restriction? I am saying 2 connections max to the database per each user. I did say that it is capable of having 200 connections in total.

                In this perspective the site manager software should have 1 connection to it’s database (maybe a second one to a mirror site) for adminstration tracking and overall site management. It could then create a new connection based on each individual user (or session) of that site which means a unique login id is created or used.
                  • 26903
                  • 1,336 Posts
                  This is the setting ’max_user_connections =’ when you use the manager/site your username is as set in your config.inc.php when you installed MODx, it makes no odds how many max connections you have if you limit your MODx db user to only 2 connections. The 151 limit above effectively gives MODx 151 connections on my system unless I’m logged into the db through the mysqlci as another user e.g. root.
                    Use MODx, or the cat gets it!