I am working on a site that I have deployed (r2.6) and when I monitor the processes, I sometimes see a process that hangs. By hangs I mean most take 0-2 seconds. Then there is a process that just keeps going and going and going. My host will time-out anything that is over 30 seconds long, and then I see an error. When I inquire about it they say to check db optimization etc. I know the folks here are brilliant developers so I feel like there has to be some other reason. Why so many queries are executed fine, then 1 just hangs? (Thinking aloud)
Maybe a better question (for me) is what causes a query to hang? Is it as a result from a slow connection from the client? The site I am working with is https, would that have anything to do with it? I am using a command in the .htaccess file to force ssl.
I have installed and run several other sites with MODx (evo and revo) without ever running into this.
If anyone has any thoughts I would greatly appreciate it.
If it’s query related, can’t you check mysql_slow_queries for it?
MODx 2.0.6
PHP 5.3.3
MySQL 5.1.50
WWGD:
http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=mysql_slow_queries
MODx 2.0.6
PHP 5.3.3
MySQL 5.1.50
Thank you for the link, I will dive in!
It may be an inefficient query of yours, but since it’s intermittent, I think it’s more likely that your host’s MySQL server is simply overloaded.
Good point Bob. Along those lines, could it be some sort of bot flooding you with a bunch of data, or misusing a query string perhaps? Do you have any custom URL inputs happening that could be querying your DB with unsanitized data? If you could mark an IP to a process, you could see what scripts it was hitting , and then possibly diagnose the cause, but I’m not sure that’s possible with whatever sort of host you’re using. Is this a shared hosting environment?
MODx 2.0.6
PHP 5.3.3
MySQL 5.1.50
Thank you both very much for your comments. I greatly appreciate it. I think what was happening was a bad (if you can call it bad) install of Revo for whatever reason. I re-ran the setup and everything is smooth sailing. I knew it wasn’t the fault of MODx. When the system admins suggested I check the queries, I knew there had to be something else to the equitation. I have love working with MODx.
@someone - I thought that a bot or something/anything could be holding up traffic, but it was always the hosts’ IP that was using the resource(s).
Thank you both again.