Author Topic: Database size?  (Read 378 times)

Offline JonnyFB421

  • Semi-Newbie
  • *
  • Posts: 26
Database size?
« on: November 07, 2009, 02:01:26 AM »
Hello everyone! 

So I've been maintaining a forum for some people for some time, and I'm obviously not that experienced with SMF so I thought it would be idea to have the forum hosted on local host as well for when I add mods and 'tweak' things.  Although after a week went by I and I went to export my database via phpMyAdmin I noticed it went from 15 mb to 75 mb.  This is a fairly active forum but that seems a little extreme. 

Forum Stats:
Total Members:    447
Total Posts:     14306


Can someone let me know if the size sounds right for those stats? 
It is now too large for me to import the table into my local host. 

Also when I use the Admin Pannel to create a backup it seems that in the .sql it makes it there is an error:
Code: [Select]
<b>Fatal error</b>:  Allowed memory size of 16777216 bytes exhausted (tried to allocate 5936844 bytes) in <b>/gsadmin/var/websites/fbiclans.ycn-hosting.com/forum/Sources/DbExtra-mysql.php</b> on line <b>296</b><br />
If there is a way to fix that, I would love to know it so I don't have to make back ups in phpMyAdmin :) 

Thanks for reading!

Offline Antechinus

  • Senior Support Specialist
  • Simple Machines Super Hero
  • *
  • Posts: 10,472
  • Master of Diplomacy
Re: Database size?
« Reply #1 on: November 07, 2009, 02:32:07 AM »
It sounds way too large for that number of posts. Have you noticed any errors or odd behaviour?
Alternative colour schemes for the new Curve theme
Alternative quote box styles for the new Curve theme

"Never argue with idiots. They bring you down to their level and then beat you with experience."


Offline JonnyFB421

  • Semi-Newbie
  • *
  • Posts: 26
Re: Database size?
« Reply #2 on: November 07, 2009, 02:47:40 AM »
Nope I checked for errors, they had SMF Media Gallery (SMG) v2.0.2 installed but, it has been removed for some time.  I'm very baffled on what could be taking up all this space.

Offline Antechinus

  • Senior Support Specialist
  • Simple Machines Super Hero
  • *
  • Posts: 10,472
  • Master of Diplomacy
Re: Database size?
« Reply #3 on: November 07, 2009, 02:56:13 AM »
Ah. Question: was the 15meg compressed (gzip) and the 75meg uncompressed? That would explain the difference in size. If they were both compressed using the same file type, or both uncompressed, then that is a different matter.
Alternative colour schemes for the new Curve theme
Alternative quote box styles for the new Curve theme

"Never argue with idiots. They bring you down to their level and then beat you with experience."


Offline JonnyFB421

  • Semi-Newbie
  • *
  • Posts: 26
Re: Database size?
« Reply #4 on: November 07, 2009, 03:08:32 AM »
No that's both uncompressed. 

Offline Antechinus

  • Senior Support Specialist
  • Simple Machines Super Hero
  • *
  • Posts: 10,472
  • Master of Diplomacy
Re: Database size?
« Reply #5 on: November 07, 2009, 03:15:48 AM »
Ok. Figured it was worth a shot. ;) Which particular database tables have shown marked growth in size? Please do a comparison for us. That should help narrow things down.

Also, just to be sure, please check your root directory for core files. These (if any are there) will be named with a four digit string after the word "core". If any recent core files are present this indicates a server problem.
Alternative colour schemes for the new Curve theme
Alternative quote box styles for the new Curve theme

"Never argue with idiots. They bring you down to their level and then beat you with experience."


Offline Arantor

  • Customizer
  • Simple Machines Super Hero
  • *
  • Posts: 19,412
  • Gender: Male
  • Through the fire and flames we carry on.
    • World of Thoughts
Re: Database size?
« Reply #6 on: November 07, 2009, 08:41:31 AM »
If you have access to phpMyAdmin, please advise what tables you have, and how many rows in each.
Customizer, SMF Team
My mods [22]
Current to-do list
Developer of Atrinik

No unsolicited PMs, thank you.
Current project:
Writing an OpenSearch integration for SMF.

Quote
Telling me "it doesn't work" is like a blunt pencil: pointless.
Why doesn't it work? What do you expect it to do?

Offline JonnyFB421

  • Semi-Newbie
  • *
  • Posts: 26
Re: Database size?
« Reply #7 on: November 09, 2009, 01:43:33 AM »



    smf_admin_info_files             7             79.0 KiB     312 B
   smf_ajaxchat_bans             0       1.0 KiB    -
   smf_ajaxchat_invitations       2       1.0 KiB    -
   smf_ajaxchat_messages         3,472    271.6 KiB    -
   smf_ajaxchat_online         1       1.1 KiB    36 B
   smf_ajaxshout_bans         0       1.0 KiB    -
   smf_ajaxshout_invitations      0       1.0 KiB    -
   smf_ajaxshout_messages      0       1.0 KiB    -
   smf_ajaxshout_online         0       1.0 KiB    -
   smf_announcements         0       1.0 KiB    -
   smf_announcements_comments   0       1.0 KiB    -
   smf_announcements_log         0       1.0 KiB    -
   smf_approval_queue         0       1.0 KiB    -
   smf_attachments             80       13.6 KiB    -
   smf_awards                1       2.1 KiB    -
   smf_ban_groups             11       3.3 KiB    24 B
   smf_ban_items             53       4.5 KiB    108 B
   smf_battle                31       7.5 KiB    -
   smf_battle_graveyard         7       2.2 KiB    -
   smf_battle_monsters         3       2.1 KiB    -
   smf_boards                42       12.6 KiB    68 B
   smf_board_permissions         1,977    83.0 KiB    -
   smf_buy_items                0       1.0 KiB    -
   smf_calendar                0       1.0 KiB    -
   smf_calendar_holidays         167       11.0 KiB    -
   smf_categories             8       2.2 KiB    32 B
   smf_collapsed_categories      17       2.1 KiB    7 B
   smf_custom_fields             0       1.0 KiB    -
   smf_down_cat                1       2.0 KiB    -
   smf_down_catperm             0       1.0 KiB    -
   smf_down_comment         0       1.0 KiB    -
   smf_down_creport             0       1.0 KiB    -
   smf_down_custom_field         0       1.0 KiB    -
   smf_down_custom_field_data      0       1.0 KiB    -
   smf_down_file                1       2.1 KiB    -
   smf_down_groupquota         0       1.0 KiB    -
   smf_down_rating             1       2.0 KiB    -
   smf_down_report             0       1.0 KiB    -
   smf_down_userquota         1       2.0 KiB    -
   smf_global_announcements      0       1.0 KiB    -
   smf_global_announcements_boards0       1.0 KiB    -
   smf_group_moderators          0       1.0 KiB    -
   smf_log_actions             3,519    525.3 KiB    -
   smf_log_activity             95       5.4 KiB    -
   smf_log_banned             22       3.9 KiB    -
   smf_log_boards             3,772    86.8 KiB    -
   smf_log_comments             14       6.6 KiB    -
   smf_log_digest             22,858    447.4 KiB    -
   smf_log_errors                264,467    71.5 MiB    -
   smf_log_floodcontrol          7       2.4 KiB    76 B
   smf_log_group_requests          0       1.0 KiB    -
   smf_log_karma             2       3.2 KiB    180 B
   smf_log_mark_read             357       10.5 KiB    -
   smf_log_member_notices      5       2.8 KiB    -
   smf_log_notify                221       14.2 KiB    -
   smf_log_online                15       31.0 KiB    22.7 KiB
   smf_log_packages             63       14.0 KiB    -
   smf_log_polls                1,225    31.7 KiB    96 B
   smf_log_reported                  21            16.6 KiB     -
   smf_log_reported_comments      23       6.7 KiB    -

Offline Antechinus

  • Senior Support Specialist
  • Simple Machines Super Hero
  • *
  • Posts: 10,472
  • Master of Diplomacy
Re: Database size?
« Reply #8 on: November 09, 2009, 02:19:03 AM »
Well I can see straight away that you have a log_errors table taking up 71.5 meg. There's your answer. The error log has been filling up like crazy and must have never been cleared. So the next question is what on earth is generating that many errors that quickly? You must have a stack of messages in the SMF admin error log.
Alternative colour schemes for the new Curve theme
Alternative quote box styles for the new Curve theme

"Never argue with idiots. They bring you down to their level and then beat you with experience."


Offline JonnyFB421

  • Semi-Newbie
  • *
  • Posts: 26
Re: Database size?
« Reply #9 on: November 09, 2009, 02:35:24 AM »
Apply filter of type: All errors (267616) | Critical (3) | General (477) | undefined_vars� (26190) |  Undefined (240582) | user����������� (40) | User (324)

After browsing just a few pages I see nearly all of Undefined

0f6e2efb495751bdd19b21ed2dd2d8f0
File: /gsadmin/var/websites/fbiclans.ycn-hosting.com/forum/Themes/default/Display.template.php (body_above sub template - eval?)
Line: 250

45028d2a888655b05453851644edfa04
File: /gsadmin/var/websites/fbiclans.ycn-hosting.com/forum/Themes/default/MessageIndex.template.php (body_above sub template - eval?)
Line: 250

(Thanks for the help this far hope we can hammer it out!)

Offline Antechinus

  • Senior Support Specialist
  • Simple Machines Super Hero
  • *
  • Posts: 10,472
  • Master of Diplomacy
Re: Database size?
« Reply #10 on: November 09, 2009, 02:48:17 AM »
If it is an undefined index error there will be a first line something like: 8: Undefined index: message

The last word there is the bit we will be looking for (that one is taken from my error log so yours wont be the same ;) ).

You can clear your error log safely, which will knock your db back to a reasonable size. The error will regenerate rapidly so there's no need to keep records of 240,000 of them.

The other thing is that template eval is useful for general running of the forum but gets in the way sometimes when tracking specific errors.

I advise installing this mod as it allows you to switch template eval on and off easily: http://custom.simplemachines.org/mods/index.php?mod=2054

Once you have template eval disabled we will be able to see exactly where the error is being generated.
Alternative colour schemes for the new Curve theme
Alternative quote box styles for the new Curve theme

"Never argue with idiots. They bring you down to their level and then beat you with experience."


Offline JonnyFB421

  • Semi-Newbie
  • *
  • Posts: 26
Re: Database size?
« Reply #11 on: November 09, 2009, 03:35:50 AM »
Seems to have worked, now I'm getting:


015ce35c5a9989cdf1ab006c9e7e0a4f
8: Undefined index: 102
File: C:/xampp/htdocs/forum/Themes/Panther20/index.template.php
Line: 250

Offline Antechinus

  • Senior Support Specialist
  • Simple Machines Super Hero
  • *
  • Posts: 10,472
  • Master of Diplomacy
Re: Database size?
« Reply #12 on: November 09, 2009, 03:43:56 AM »
Ok, that makes sense. That is 1.1.x code which has probably been left in the template by mistake.   $txt[102] = 'News';

So, find $txt[102] on that line of your template and change it to $txt['news']

That should sort the error. :)
Alternative colour schemes for the new Curve theme
Alternative quote box styles for the new Curve theme

"Never argue with idiots. They bring you down to their level and then beat you with experience."


Offline JonnyFB421

  • Semi-Newbie
  • *
  • Posts: 26
Re: Database size?
« Reply #13 on: November 09, 2009, 04:01:42 AM »
You are a god :|  Thank you so much for all of your help you have no idea how grateful I am!  It seems to have stopped generating errors now!  I'm sure you'll be hearing from me soon when I need help with something else  O:).

 Thanks!

Offline Antechinus

  • Senior Support Specialist
  • Simple Machines Super Hero
  • *
  • Posts: 10,472
  • Master of Diplomacy
Re: Database size?
« Reply #14 on: November 09, 2009, 04:04:24 AM »
You're welcome. Once you get the hang of it minor errors like this one are easy enough to fix. You'll be doing it in no time.
Alternative colour schemes for the new Curve theme
Alternative quote box styles for the new Curve theme

"Never argue with idiots. They bring you down to their level and then beat you with experience."