Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
  #1  
Old 01-07-2017, 07:21 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default High Mysql Queries!!

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...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.
Reply With Quote
  #2  
Old 01-07-2017, 07:45 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #3  
Old 01-07-2017, 10:08 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 [DATE]1483834240[/DATE] at [TIME]1483834240[/TIME] ---------------

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 !!
Reply With Quote
  #4  
Old 01-08-2017, 04:33 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
2 благодарности(ей) от:
In Omnibus, MarkFL
  #5  
Old 01-08-2017, 05:43 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 01-09-2017, 01:04 PM
Mattwhf Mattwhf is offline
 
Join Date: May 2016
Posts: 190
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #7  
Old 01-09-2017, 04:52 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mattwhf View Post
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.
Reply With Quote
  #8  
Old 01-09-2017, 06:52 PM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 01-09-2017, 08:31 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by In Omnibus View Post
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...AB%D9%8E%D9%89

Btw, could you help in fix my issue?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04065 seconds
  • Memory Usage 2,244KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete