I can not figure this problem out for the life of me.... We're running 6.3
As of today, when you go to any page on the site, it pauses for about 30-60 seconds and then renders the page.
- The database has low activity
- The system has low activity
- Drupal is not waiting for mysql at all.
- Apache has a lot of connections because of all the clients that are connecting and hanging for 30-60 seconds.
The problem seems to be in the PHP.
I've tried to figure out where in the code this is happening. I think I've boiled it down to this:
In the index.php the following line:
elseif (isset($return)) {
// Print any value (including an empty string) except NULL or undefined:
-------------> print theme('page', $return); <------------------------
}
- I added a quick: print 'test'; exit; before the line above and I got my test back very quickly,
- I dug into the theme function and put my print 'test'; exit; at the last line before the function ended and I *STILL* get my test and a quick exit.
- When I add print 'test'; exit; after the above line, the application hangs as you see it now.
Other items of interest that may or may not matter:
- The accesslog table is 630M with 5,9M rows
- url_alias table has 24,575 rows
- This never happened before.
What could cause such a thing ? Has anyone ever had their drupal installation suddenly get slow like this ?
Comments
I have had a slow site
I have had a slow site before, the usual suspects were
1) Not enough available memory/disk on the server
2) Cache, log tables too big (yours is collossal with 630MB :O )
3) Cron improperly configured (http://drupal.org/handbook/modules/system)
4) High traffic spikes
5) Not enforcing a 'minimum cache lifetime' (Drupal 6.x) for a reasonably trafficked site
I suggest emptying the logs and cache to start with.
Can I safely delete the rows
Can I safely delete the rows in the watchdog and accesslog tables ?
I've done em before with no
I've done em before with no problems (using phpmyadmin or command line), but as always it's best to back up your database regularly and before modifying any tables, including emptying them.
I did that, was nice to see
I did that, was nice to see the tables get smaller, but had no effect on the load time of the site.
Just tried to load the site,
Just tried to load the site, took 3minutes to look up the domain - despite ping returning in 50ms - but the site itself loaded pretty much instantly after that wait.
Looks like the problem may have nothing to do with your Drupal install, but either your host and/or domain provider.
Accesslog was the problem. We
Accesslog was the problem. We droped the table and recreated it and all was fixed. Apparently there was a database issue with the table causing problems with inserting into access log.
Excellent, glad you solved
Excellent, glad you solved it!
Erm sorry, not solved. The
Erm sorry, not solved. The front page is loading quickly, but all the subpages are still slow.. Still trying to find the problem.