Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > ibProArcade Archive
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[HELP] 2.5.6 is putting a load in my server Details »»
[HELP] 2.5.6 is putting a load in my server
Version: , by juanchi juanchi is offline
Developer Last Online: May 2012 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-19-2006 Last Update: Never Installs: 0
 
No support by the author.

I already made a post about this but there seems to be no interest on this and I'm not sure but I think it is a bug.

My site is a busy site but the latest version, 2.5.6, is putting a high load to my server, sometimes bringing my server to not working condition.

All the mysql processes show something like these:

| 4315 | xxxxxx | localhost | xxxxxxx | Query | 0 | Locked | UPDATE vbb_games_league SET mid='2122',gid='16',position='1560',points='0',cat ='1' WHERE gid=16 AND |
| 4411 | xxxxxx | localhost | xxxxxxx | Query | 0 | Locked | UPDATE vbb_games_league SET mid='1831',gid='16',position='1476',points='0',cat ='1' WHERE gid=16 AND |

And this processes become so intense that the load of the server go to the top. If I shut down the arcade the server behaves without a problem.

Right now, if there is no answer for this could someone tolde me if it is safe to roll back to 2.5.5 and if so, I will only need to upload the files from that version and overwrite the product, right?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 09-04-2006, 02:31 AM
juanchi juanchi is offline
 
Join Date: Apr 2004
Location: Panama
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi MrZeropage, I decided to stick with ibproarcade but I'm still running 2.5.5+ , I know you tweaked my settings on my server to solve this issue but the problem never go away so I rolled back to 2.5.5+, I hope we can safely upgrade to 2.5.7+ and forget this issue.
Reply With Quote
  #33  
Old 09-11-2006, 07:17 PM
Barabaika Barabaika is offline
 
Join Date: May 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are no appropriate indexes, that is the source of the problem.
What about adding an index to the "avatarid" field in the "user" table?

Also, why do you need this garbage: " AND trim(password) = '' "
trim is a function, it must be calculated every time causing some load.
Reply With Quote
  #34  
Old 09-13-2006, 08:10 AM
MrZeropage's Avatar
MrZeropage MrZeropage is offline
 
Join Date: Nov 2003
Location: Munich, Germany
Posts: 3,012
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Barabaika
There are no appropriate indexes, that is the source of the problem.
What about adding an index to the "avatarid" field in the "user" table?
why index the avatarid ? please be more detailed thx
Reply With Quote
  #35  
Old 09-14-2006, 04:59 AM
Barabaika Barabaika is offline
 
Join Date: May 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just gave a quick look at the mysql.log file for an arcade.php call.
The user table has thousands of entries and full scan can take a long time.
I found this SELECT in the log:
SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, NOT ISNULL(filedata) AS hascustom, customavatar.dateline FROM user AS user LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=1 OR user.userid=1

It includes user.avatarid that should be indexed.

I will try to check the queries thoroughly to find bottlenecks later.
EXPLAIN SELECT command can help.
Reply With Quote
  #36  
Old 09-14-2006, 10:38 AM
MrZeropage's Avatar
MrZeropage MrZeropage is offline
 
Join Date: Nov 2003
Location: Munich, Germany
Posts: 3,012
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any optimization is welcome
Reply With Quote
  #37  
Old 09-26-2006, 10:33 PM
Barabaika Barabaika is offline
 
Join Date: May 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok. I've found the main problem.

Now it creates a query like this:
function/dbclass.php, line 85
SELECT user.userid,.... WHERE customavatar.userid=111111 OR user.userid=111111;

We don't need this at all, as it makes the query on all user table entries:
customavatar.userid=111111 OR

So, the WHERE statement in the line 85 should be:
WHERE user.userid=".$idneeded;

If it's difficult to understand, I'll create a diff file.

There is another "bad" query, I'll examine it later.
Reply With Quote
  #38  
Old 09-26-2006, 10:45 PM
juanchi juanchi is offline
 
Join Date: Apr 2004
Location: Panama
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your hard Work Barabaika but are you sure this is the problem? I'm just asking, I don't know anything about coding but do you have the chance to look at versions 2.5.5 and 2.5.6 files and compare them, cause if this code is on both versions it might not be the problem, this problem apeared with version 2.5.6.

Quote:
Originally Posted by Barabaika
Ok. I've found the main problem.

Now it creates a query like this:
function/dbclass.php, line 85
SELECT user.userid,.... WHERE customavatar.userid=111111 OR user.userid=111111;
Reply With Quote
  #39  
Old 09-27-2006, 05:02 AM
Barabaika Barabaika is offline
 
Join Date: May 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

At least, it's much faster for me now.
I've created indexes and fixed several queries.

When I had looked at the server load, it was mainly MySQL that created it by getting the data for the arcade page.

The easiest way is to log slow queries in MySQL and then investigate them.
http://dev.mysql.com/doc/refman/5.0/...query-log.html


There can be other problems as well.
Reply With Quote
  #40  
Old 09-27-2006, 06:39 AM
fsw fsw is offline
 
Join Date: Sep 2005
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have not had time to even glance at the code of this - but I know one place that there is a query that is doing much more than it should be.

When a game score gets submitted - ones that have thousands of scores take time - I have seen it take up to ten seconds.

I am running a 3.2 Dual Zeon with basically no load on the server - my site the only thing on it - and almost a gig of ram dedicated to MySql - and if its in ram on my server - its in ram - I have no swap.

I know all the scores are kept in one table, no biggy - it might be up to 100,000 scores by now - my server should be able to handle anything thrown at that instantly, but it doesnt.

I am going to guess that after every game played its running quries for the overall scoring. I need to find time to look

.. anyway - if thats the case - I would recommend splitting that off (optionally) and allowing it to be ran by cron if the user prefers. I am one that does not care how much resources it needs - it isnt going to put a dent on me - but I do not like the end user to have to wait for anything (well - actually - I do not like having to read the end user +++++ about waiting
Reply With Quote
  #41  
Old 09-27-2006, 09:46 AM
juanchi juanchi is offline
 
Join Date: Apr 2004
Location: Panama
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well guys I hope MrZeropage have a chance to look at your comments before he release the new version, I know for a fact that he has been looking/working on this issue.
Reply With Quote
Reply


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 06:27 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04732 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete