We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17802
    • 190 Posts
    I’ve set up a couple of MODx sites over the years. Two of these sites are with the same hosting provider. The first one was a 0.9.6 site with the following problem: every now and then, the system events log would fill up with parser errors. Hundreds of pages of these errors:
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »
     
    PHP error debug
      Error: 	mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'x.x.nl' (2)	 
      Error type/ Nr.: 	Warning - 2	 
      File: 	/home/blah/manager/includes/extenders/dbapi.mysql.class.inc.php	 
      Line: 	89	 
      Line 89 source: 	if (!$this->conn = ($persist ? mysql_pconnect($host, $uid, $pwd) : mysql_connect($host, $uid, $pwd, true))) { 

    The second site is running MODx 1.0.4. This one gets these errors as well, but not as many. (I think the older MODx versions would get into a nearly endless loop of error messages trying to insert the error into the database - could that be true?)

    Anyway. I discussed this with the hosting provider. I’m not a back-end developer, but to me this sounds like sometimes the database isn’t accessible, right? However, the hosting provider says they’ve been checking their MySQL error logs and they can’t find anything.

    Does anyone here understand what’s going on? I still feel it’s something the provider should fix, but am I right? I’m worried because I’m afraid every error message represents a visitor to the site receiving a blank page. sad

    Any insights would be greatly appreciated!
      Thanks for MODx - I love it!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Unknown MySQL server host ’x.x.nl’
      That’s definitely a failure to find the server. Not of MySQL itself, but on the part of the DNS server resolving the host name. I get these a lot because my ISP has such crappy DNS caching servers. After two or three tries it’ll finally go through. In your case, it may be a server configuration timeout set too short, so it’s timing out if there’s any delay at all in the DNS lookup.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 17802
        • 190 Posts
        Thanks Susan! Your answer makes a lot of sense (as usual!). I’ll go and discuss this with my host.
          Thanks for MODx - I love it!