PDA

View Full Version : High Mysql Queries!!


SilverBoy
01-07-2017, 07:21 PM
Hi

I have an issue with server load as we think because of too many queries we have in every single page.

take this as an example
http://www.manshor.net/forum/content.php?6458-%D8%AA%D9%8E%D9%87%D9%8E%D8%A7%D9%88%D9%90%D9%8A%D 9%85%D9%8F-%D8%A3%D9%8F%D9%86%D9%92%D8%AB%D9%8E%D9%89
it is an article, with some widgets (all of them except one are default last articles widget) but the debug mode tell me the # of queries is 190 !!

what is wrong, and who can help to fix things?

Thanks in advance.

MarkFL
01-07-2017, 07:45 PM
My local dev site, which has a HUGE number of products running with lots of additional queries, has 48 queries on the home page.

How many queries do you get if you disable the plugin hooks?

SilverBoy
01-07-2017, 10:08 PM
It really strange Mark, I disabled every plugin in my site including plugins that not related to CMS, and left only product CMS enabled, I even removed all widgets from this page, and result is 87 queries !!

So I think there is a problem in the core system it self !!

--------------- Added 1483834240 at 1483834240 ---------------

Actually I disabled the hooks to from config file, and the same result!!
The strange thing is that this article don't contains attachments too !!

Paul M
01-08-2017, 04:33 PM
The CMS uses a lot more than people are used to seeing from just the forum.

If you have widgets and/or other stuff on the page then 80+ isn't uncommon.

SilverBoy
01-08-2017, 05:43 PM
Thanks Paul
Actually when I talk about 80+ queries in this article, the hooks was disabled and all widget was removed from their section layout.

Mattwhf
01-09-2017, 01:04 PM
Check your log files carefully or see server load when your site is in high load

Honestly I don't think it is high queries or high load that forums are under ddos attacks.

I have same problems and thought they are high load or having so many queries on threads/posts but I was wrong, they are ddos attacks, enable ddos attacks can help you in the case your forum is under a ddos attack.

Some guys on my forum are web hosting experts, you can contact them and they can support you if your hosting service is high load or having problems.

Hope that helps!

SilverBoy
01-09-2017, 04:52 PM
Check your log files carefully or see server load when your site is in high load

Honestly I don't think it is high queries or high load that forums are under ddos attacks.

I have same problems and thought they are high load or having so many queries on threads/posts but I was wrong, they are ddos attacks, enable ddos attacks can help you in the case your forum is under a ddos attack.

Some guys on my forum are web hosting experts, you can contact them and they can support you if your hosting service is high load or having problems.


Hope that helps!
Thank you Mattwhf for your reply and your help.

Actually I don't think it is ddos attack, because forum (threads) pages don't use a lot of queries, the problem only in the CMS articles.

As I mentioned before in this thread, in one of the articles I removed all widgets after disabling hooks and get 80+ queries in that page.

BTW, if you have a time, please check the CMS article page that I put in the previous reply and check the debug message if it can help.

Another thing, could you help me regarding log files, which files and what I have to look at them exactly?

Thanks.

In Omnibus
01-09-2017, 06:52 PM
You have 11.65MB loading every time the page refreshes. 6MB of that is JS. For comparison, I have 2.65MB total loading on my index page. If you disable your ads, facebook, and revert to the default theme you would see far fewer queries. You don't need to go to any log files or look for any ddos issues. You just need to have someone who actually looks at your site with the proper development tools before giving you advice. The bottom line is you are running a large number of JS queries and you should decide if the modifications and add ons that run those queries are necessary for your site. If not, uninstall them.

SilverBoy
01-09-2017, 08:31 PM
You have 11.65MB loading every time the page refreshes. 6MB of that is JS. For comparison, I have 2.65MB total loading on my index page. If you disable your ads, facebook, and revert to the default theme you would see far fewer queries. You don't need to go to any log files or look for any ddos issues. You just need to have someone who actually looks at your site with the proper development tools before giving you advice. The bottom line is you are running a large number of JS queries and you should decide if the modifications and add ons that run those queries are necessary for your site. If not, uninstall them.

Thank you Omnibus for your reply.

Are you talking about the homepage or this page?
http://www.manshor.net/forum/content.php?6458-%D8%AA%D9%8E%D9%87%D9%8E%D8%A7%D9%88%D9%90%D9%8A%D 9%85%D9%8F-%D8%A3%D9%8F%D9%86%D9%92%D8%AB%D9%8E%D9%89

Btw, could you help in fix my issue?