My host wrote me the problem so i will copy past it here, please help me out:
root@host [/home2]# mysqladmin proc
+——-+—————+———–+————–+—————-+——+———————-+——————————————————————————————————+
| Id | User | Host | db | Command | Time | State | Info |
+——-+—————+———–+————–+—————-+——+———————-+——————————————————————————————————+
| 5 | eximstats | localhost | eximstats | Sleep | 16 | | |
| 45312 | leechprotect | localhost | leechprotect | Sleep | 6869 | | |
| 48148 | israelfa_ifau | localhost | israelfa_ifa | Query | 36 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48198 | israelfa_ifau | localhost | israelfa_ifa | Query | 78 | Sending data | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48363 | israelfa_ifau | localhost | israelfa_ifa | Query | 39 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48436 | israelfa_ifau | localhost | israelfa_ifa | Query | 95 | Sending data | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48438 | israelfa_ifau | localhost | israelfa_ifa | Query | 32 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48455 | israelfa_ifau | localhost | israelfa_ifa | Query | 50 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48483 | israelfa_ifau | localhost | israelfa_ifa | Query | 48 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48505 | israelfa_ifau | localhost | israelfa_ifa | Query | 85 | Sending data | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48605 | israelfa_ifau | localhost | israelfa_ifa | Query | 28 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48907 | israelfa_ifau | localhost | israelfa_ifa | Query | 69 | Sending data | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48932 | israelfa_ifau | localhost | israelfa_ifa | Query | 27 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48961 | israelfa_ifau | localhost | israelfa_ifa | Query | 76 | Sending data | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 48989 | israelfa_ifau | localhost | israelfa_ifa | Query | 70 | Sending data | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 49037 | israelfa_ifau | localhost | israelfa_ifa | Query | 59 | Sending data | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 49054 | israelfa_ifau | localhost | israelfa_ifa | Query | 74 | Sending data | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 49074 | israelfa_ifau | localhost | israelfa_ifa | Query | 47 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 49124 | israelfa_ifau | localhost | israelfa_ifa | Query | 41 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 49183 | israelfa_ifau | localhost | israelfa_ifa | Query | 37 | Sorting result | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 49196 | israelfa_ifau | localhost | israelfa_ifa | Query | 56 | Sending data | SELECT *
FROM ifawp_posts p
WHERE p.post_status = ‘publish’
AND p.post_password = ”
|
| 50221 | DELAYED | localhost | eximstats | Delayed insert | 16 | Waiting for INSERT | |
| 50838 | DELAYED | localhost | eximstats | Delayed insert | 160 | Waiting for INSERT | |
| 50898 | israelfa_ifau | localhost | israelfa_ifa | Sleep | 49 | | |
| 50906 | israelfa_ifau | localhost | israelfa_ifa | Query | 38 | Sending data | SELECT SQL_CALC_FOUND_ROWS ifawp_posts.ID FROM ifawp_posts WHERE 1=1 AND (ifawp_posts.post_author |
| 50907 | israelfa_ifau | localhost | israelfa_ifa | Query | 16 | Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS ifawp_posts.ID FROM ifawp_posts INNER JOIN ifawp_term_relationships ON |
| 50916 | israelfa_ifau | localhost | israelfa_ifa | Query | 1 | Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS ifawp_posts.ID FROM ifawp_posts INNER JOIN ifawp_term_relationships ON |
| 50921 | israelfa_ifau | localhost | israelfa_ifa | Query | 9 | Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS ifawp_posts.ID FROM ifawp_posts INNER JOIN ifawp_term_relationships ON |
| 50922 | israelfa_ifau | localhost | israelfa_ifa | Query | 1 | Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS ifawp_posts.ID FROM ifawp_posts INNER JOIN ifawp_term_relationships ON |
| 50940 | israelfa_ifau | localhost | israelfa_ifa | Query | 7 | Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS ifawp_posts.ID FROM ifawp_posts INNER JOIN ifawp_term_relationships ON |
| 50941 | israelfa_ifau | localhost | israelfa_ifa | Query | 7 | Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS ifawp_posts.ID FROM ifawp_posts INNER JOIN ifawp_term_relationships ON |
| 50945 | israelfa_ifau | localhost | israelfa_ifa | Query | 2 | Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS ifawp_posts.ID FROM ifawp_posts INNER JOIN ifawp_term_relationships ON |
| 50949 | root | localhost | | Query | 0 | | show processlist |
+——-+—————+———–+————–+—————-+——+———————-+——————————————————————————————————+
-
This topic was modified 11 years by
battlemas.
Likely you should run a plugin to evaluate which plugins are using the most system resources and disable them.
eg., https://wordpress.org/plugins/p3-profiler/
I have a dedicated server running 3 instances of Newspaper, one instance of Newsmag, and 10 other themes on 10 other sites, with no such overload issues.
Heh. Yeah, well, that would make the difference. 15,000 posts on one site, vs 692,000 is totally different thing. Even if we have 20 sites, it’s still different animal. Our main big site has 15 years of content, but we use custom CMS to spit out static pages so the dbase is only queried when building static pages so the content that doesn’t change doesn’t do dbase queries all the time (good ol server side includes and shtml).
The amount of posts might be the issue. Still, WordPress is running some big sites like TIME magazine, etc.
I would imagine you’ve already done all sorts of optimizations for RAM (e.g., 16GB to your domain or more), all the modern php optimizers, and limit the number of query objects per page, and/or implement things like archival content has smaller payloads per page (e.g., items more than x years older use lighter template, etc.).
However, I’d likely go ahead and try the P3 profiler if you’re not already using something like that just to double check what is generating the most queries beyond the on-page theme stuff.
Newsmag is more fixed width, while Newspaper is more wide screen. Both from TagDiv.
Obviously setting up simpler things on page like not using megamenu on posts, not doing extra queries in footer, using fewer images on page, etc. can cut down on number of dbase queries.
Also optimize the wp-config.php file if not already done to reduce {get directory name} kind of queries.
Right. So, 32GB allocated to one domain is puh-lenty! We have 32GB and 12 Xeon cores, and allocate 4GB max per small site, and 16GB to our big site for php.
Yes, any theme will be involved in how many queries you have per page, based on how complex you’re doing the layout. E.g., using the “query dbase to show 10 most recent items” on every page is a query; so, architecting the pages as simply as possible will cut down on “number of queries” per page, if RAM is not the issue, and php queries are overloading server.
A page layout with 50 dbase queries will overload CPU’s more readily than page with 25 queries on page.
You can simply switch to twenty-fifteen theme temporarily while debugging.
One presumes you have anti-hacking stuff setup like “limit login attempts” and CSF for port scanning blocking, and something in place to stop bots from hitting your lost password link on admin screen; moved admin login to hidden location, turned of pingbacks, etc., etc.
Hello
Wow thanks for the help
1. I have other sites, but they do not use much resources.
2. If i switch theme, data if this theme be lost
3. So what you say is that when i put in sidebar latest posts, it is part of the problem?
4. I use sucuri firelwall/cache, it helps me on that end.
Thanks !!
Hi,
our server has been overloaded in past by hackers, port flooding, bots reading all our pages 50x a day from Russia and China search bots.
CSF/firewall/IPtables on server protects against port scans, port flooding; blocks an IP for hitting your site 500x looking for vulnerability.
You can switch to default theme and not lose settings. Same thing as doing a site update, where you temporarily switch to default theme before updating the theme you’re using. I just updated to newsmag 1.4 today, switched to default theme, when I switched my theme back on, all settings still there. WP expects this behavior. 🙂
But yet … EVERYTHING you put on a sidebar, footer, menu which as to “go look and bring back stuff” is a dbase query.
You can look at the WordPress Codex also for topics on “optimizing database” and general info on how all the dbase queries work. But all those modules on home page are dbase queries, but it’s just one page, One million other pages with too many queries, would overload dbase, if all those pages were being loaded concurrently (all at once) such as a spider reading all your pages.
But your host can help you with stuff like checking to see if you’re being abused from external IP or not. Ideally you should be getting a daily summary for your server of intrusion attempts by IP, notes from server about FTP accesses, and if any of your hard drive partitions are being filled up.
But anyway, just some ideas. 🙂
Hello
Thank you for taking the time help me out, yes the host checked, and he told me it is this code that i posted in my first post, i hoped maybe who made this theme could help me even a little be nice, like what to remove from the template, or optimize the code so CPU will not over load.
Thanks !!
hi sorry for the delay,
Are you sure the issue is due to high cpu load? This is very unusual because usually the weakest link is the HDD/SSD (high I/O wait).
can you give me the output from sar:
sar 1 10
you should get something like this in 10 seconds http://screencast.com/t/KpiNQkRbBg
I would also suggest to make a test with the default theme from wordpress because that many posts are really pushing the limits of WordPress and MySQL (IF it’s not properly configured). The theme uses about 30% more queries than the default wordpress theme and it adds up with each block that you add to the homepage / sidebar.
Please know that issues like this are very hard to debug and the high cpu load can come from a variety of reasons including: high traffic + server that is not properly configured, poor cache choices / configurations, poor mysql configuration, slow hdd/ssd, no php op cache, WordPress limits (at that many posts, wp is almost at it’s limit and if you search a bit on the web about this you will find that it is terribly slow with many posts), etc…
Radu O.
-
This reply was modified 11 years by
Radu.