Help! recently I got this "database error"

cattz

(◣_◢)
Jun 11, 2007
305
5
So guests are hogging up the bandwidth? :O

1 member for every 4 guests usually, but spikes well beyond that ratio at japanese peak times.

But it's more about the almost constant number of 1500+++ people viewing the forums it seems, to sum everything up.
 

Denamic

Swedish Meat
Staff member
Super Moderator
Former Staff
Dec 7, 2006
839
11
So guests are hogging up the bandwidth? :O
There's no problems with bandwidth, it's the server's processing power.
It's a quad core beast. It's about as powerful as servers get without going into heavy duty commercial stuff. With this many people, the server has to generate up to a thousand PHP pages every second. Imagine if you generated a PHP page on your home computer. It'd likely take some 0.01 seconds to generate. If you ran it continuously, you could generate about 100 pages per second, to put things into perspective.
 

waikeng

New Member
Apr 6, 2008
115
0
There's no problems with bandwidth, it's the server's processing power.
It's a quad core beast. It's about as powerful as servers get without going into heavy duty commercial stuff. With this many people, the server has to generate up to a thousand PHP pages every second. Imagine if you generated a PHP page on your home computer. It'd likely take some 0.01 seconds to generate. If you ran it continuously, you could generate about 100 pages per second, to put things into perspective.

I just wonder since I'm not an IT professional. If users make a good habit of logging out after they've visited this site helps to improve the situation? I do noticed that some members just close the page without logging out. Thanks!
 

jupiter999

loves Tada Mizuho only...
Apr 2, 2008
495
0
I just wonder since I'm not an IT professional. If users make a good habit of logging out after they've visited this site helps to improve the situation? I do noticed that some members just close the page without logging out. Thanks!

Wait!! You mean logging out helps improving the server??:dribble:
Somebody please clarify this...?
 

jupiter999

loves Tada Mizuho only...
Apr 2, 2008
495
0
Looks like Chompy is busy. I will answer some of the questions on his behalf if you guys don't mind. If my answers are wrong, chompy will/may correct it once he's free to reply.:relax-bath:



Yup.



I am not sure for the members (have to check the member list and see where they came from, and that would take a lot of time to figure out). But I am sure more than half of the visitors/guests are coming from Japan. Recently the name of A-O has been spreaded up into the biggest japanese bbs - 2ch. Some people link the IV torrent thread links to there, lurred a lot of people rushing into the forum everyday & nite.



I believe the numbers of the members will not be the problem. The most important thing we should concerning is the number of the online users. If there's a LOT of members (which exceeding the suggested limit) online and browsing in the forum all in one time, their acitivities may be exceeding the limit of the bandwidth in the forum. Then the admin would have no choice but to buy/add more bandwidth into the server in order to avoid the issues such as server slowing down/crashing.



Woah! Chompy handling the server all by himself/herself? That is tedious! Oh my god...
Regarding the Japanese members that maybe exceeds 50% of this forum's population, why aren't there a room for teaching Japanese for dummy like me?:evillaugh:
 

waikeng

New Member
Apr 6, 2008
115
0
Wait!! You mean logging out helps improving the server??:dribble:
Somebody please clarify this...?

I'm just asking whether for registered members doing it this way can help to bring down the load of the server.

I rely on common sense alone with no IT knowledge basis. If too many of the registered members ignore to logout after visiting this site then will it end up the server being overload while continue to standby for those users who has closed the page.

Does this way affect other registered member users to have problem to login is my concern. Surely there are lots of members here who can contribute more ideas on how to resolve this issue instead of taking away too much of the time from "Chompy", "jupiter999" or other Moderators and Administers who can be extremely busy. Thanks anyway !
 

jupiter999

loves Tada Mizuho only...
Apr 2, 2008
495
0
Does this way affect other registered member users to have problem to login is my concern. Surely there are lots of members here who can contribute more ideas on how to resolve this issue instead of taking away too much of the time from "Chompy", "jupiter999" or other Moderators and Administers who can be extremely busy. Thanks anyway !

I'm not busy anyway (because I just somehow got time to daydream of Tada Mizuho too often...:snooze:)
But I'm no way of handling servers and IT stuff alike...
 

Denamic

Swedish Meat
Staff member
Super Moderator
Former Staff
Dec 7, 2006
839
11
Leaving without logging out doesn't affect performance at all. Actually, it'd take more resources for the server to log out, since the server have to give you a log out screen. When you just leave, the server doesn't have to do anything but consider you off-line after 600 seconds.
Either way, it doesn't make any actual difference at all, as being idle doesn't burden the server since it doesn't have to do anything. The one thing that burdens the server the most is searching. This includes the 'New Posts' function. One solution is to increase delay between searches, but that sucks. Another would be to ban unregistered users from searching, which also sucks. The best solution would be to increase the delay between searches only for unregistered users, but as far as I know, there's no function in vB that allows you to do that.
 

techie

SuupaOtaku
Jul 24, 2008
568
4
Another thing that would be taking up resources is the JOIN in mysql calls too.
Although MySQL is normally a few hundred times faster on its own, than what PHP can perform with.

The main resource hog behind most forums is really the way PHP interacts with MySQL and the browsers, rather than the database itself.

Another factor which could cause problems is, for instance, shoudl the server be calling a shared hosts database, then the calls are normally set to timeout after 15 second max query time, whereas if you have your own box this couid be increased.

The next factor, which is the biggest issue, that MySQL allows by default X number of unique users to access the database at one time, though this is not the issue either, since PHP is local and using ONE (1) user position.

This one user now have to perform queries for 3000 + users.

An option to reduce the database errors would be to design a system running off of say 10 sub domains.

assuming akiba-online.com is ao.com

srv0.ao.com
srv1.ao.com
srv2.ao.com
srv3.ao.com ...a.s.o

will each be set up with an identical copy of the site.

Each and all of the sites are calling the same database and thereby everyone sees in real-time the same files and template and results....

now each sub domain gets a unique user id from Chompy for accessing the MYSQL database...

and voila'... database errors reduced as we now have Nth users calling the queries at various times...

Just a little idea to toy with....

Oh yeah my nick is Techie...
I think, therefore MYSQL has to loop like nuts. (^^)

Edit:

Dropping the idea of sub domains since it may not be needed unless as for splitting some sections of to its own area...

It can also be achieved by simple random selection of users

assuming db MySQL user id NNN_0 - NNN_9

where the definition of the db uid is set, introduce a simple

$i = date("s",time()); //get the current second
$i = (int)substr($i,strlen($i)); //but only the last 10th
$CurrentdbUID = "NNN_".$i; //set the user


Now you have ten uid's "load balancing" the queries and increasing the number of concurrent hits through the same php page
 

fr0stbyte

Member
Former Staff
Apr 8, 2008
739
10
There's no problems with bandwidth, it's the server's processing power.
It's a quad core beast. It's about as powerful as servers get without going into heavy duty commercial stuff. With this many people, the server has to generate up to a thousand PHP pages every second. Imagine if you generated a PHP page on your home computer. It'd likely take some 0.01 seconds to generate. If you ran it continuously, you could generate about 100 pages per second, to put things into perspective.

Thanks for info! The database error keeps popping up at night time so I just tend to browse the forum every morning.