Welcome to RaGEZONE - MMORPG Development Forums (sponsored by tfn.gr) Mark forums read | View Forum Leaders
RaGEZONE - MMORPG Development Forums (sponsored by tfn.gr)

Habbo Development Discuss, [DEV] Holograph Emulator - Total Database Pooling at Habbo Hotel forum; Do you know what causes the sit/lay error? is it my dcrs? or my db? if dcrs can you pls ...




Reply
Thread Tools
[DEV] Holograph Emulator - Total Database Pooling
 
 
Erday im hustlin

Rank: Member


Reply With Quote
Blog Entries: 4
 
Join Date: Dec 2007
Location: Sandaygo
Posts: 699
11-09-2008, 01:18 AM
 
Do you know what causes the sit/lay error? is it my dcrs? or my db? if dcrs can you pls post a link
and thanks mate everything works perfectly other than that!
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Mar 2008
Location: Habbz Hotel
Posts: 367
11-09-2008, 01:35 AM
 
Quote: Originally Posted by Goodwill View Post
V23 is shit i have V24 dcr this server is V24..

FYI. its V22/V23/V24

V25 and V26 Will come in the near future
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Aug 2006
Location: Some place in england
Posts: 286
11-09-2008, 01:39 AM
 
Quote: Originally Posted by Bapestar View Post
Do you know what causes the sit/lay error? is it my dcrs? or my db? if dcrs can you pls post a link
and thanks mate everything works perfectly other than that!
It is the database but I do not know what causes it (It might be the server I started off with).
 
 
permalink
 

 
Erday im hustlin

Rank: Member


Reply With Quote
Blog Entries: 4
 
Join Date: Dec 2007
Location: Sandaygo
Posts: 699
11-09-2008, 01:44 AM
 
Right,
Well i'll wait for your next release or fix since i love this source is hella clean i also noticed that guides are disabled! Good luck mate, thumbs_up!
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Mar 2008
Location: Habbz Hotel
Posts: 367
11-09-2008, 01:51 AM
 
Quote: Originally Posted by Bapestar View Post
Right,
Well i'll wait for your next release or fix since i love this source is hella clean i also noticed that guides are disabled! Good luck mate, thumbs_up!
Cecer1 and me discussed guide support not long ago and decided against it, Guide tool in a retro is useless unless you have hundreds of users online like open hotel and Holo Hotel

The next release should have a few more bugs fixed. The Goal is to stabilize each version up to the latest V27. if v27 can be done
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Aug 2006
Location: Some place in england
Posts: 286
11-09-2008, 01:54 AM
 
If you really want guides send me a PM explain why it is needed (I want a good reason not because it is cool) and I might code it
 
 
permalink
 

 
RUN KIDDIES RUN

Rank: Member


Reply With Quote
 
Join Date: Mar 2007
Location: netherland
Posts: 612
11-09-2008, 01:56 AM
 
the v27 can be done you need to host the sec.cct and the code in the DU packet if you need more info just pm and nice work:)^_^ i think this is the best source ever btw i add the landscape in in this source i will release the code soon but first the sit tags and select swimming outfit etc

(v26 stuff) the badge shizzle

sendData("Ft" + "SHJIACH_Graduate1" + Convert.ToChar(2) + "PAIACH_Login1" + Convert.ToChar(2) + "PAJACH_Login2" + Convert.ToChar(2) + "PAKACH_Login3" + Convert.ToChar(2) + "PAPAACH_Login4" + Convert.ToChar(2) + "PAQAACH_Login5" + Convert.ToChar(2) + "PBIACH_RoomEntry1" + Convert.ToChar(2) + "PBJACH_RoomEntry2" + Convert.ToChar(2) + "PBKACH_RoomEntry3" + Convert.ToChar(2) + "SBRAACH_RegistrationDuration6" + Convert.ToChar(2) + "SBSAACH_RegistrationDuration7" + Convert.ToChar(2) + "SBPBACH_RegistrationDuration8" + Convert.ToChar(2) + "SBQBACH_RegistrationDuration9" + Convert.ToChar(2) + "SBRBACH_RegistrationDuration10" + Convert.ToChar(2) + "RAIACH_AvatarLooks1" + Convert.ToChar(2) + "IJGLB" + Convert.ToChar(2) + "IKGLC" + Convert.ToChar(2) + "IPAGLD" + Convert.ToChar(2) + "IQAGLE" + Convert.ToChar(2) + "IRAGLF" + Convert.ToChar(2) + "ISAGLG" + Convert.ToChar(2) + "IPBGLH" + Convert.ToChar(2) + "IQBGLI" + Convert.ToChar(2) + "IRBGLJ" + Convert.ToChar(2) + "SAIACH_Student1" + Convert.ToChar(2) + "PCIHC1" + Convert.ToChar(2) + "PCJHC2" + Convert.ToChar(2) + "PCKHC3" + Convert.ToChar(2) + "PCPAHC4" + Convert.ToChar(2) + "PCQAHC5" + Convert.ToChar(2) + "QAIACH_GamePlayed1" + Convert.ToChar(2) + "QAJACH_GamePlayed2" + Convert.ToChar(2) + "QAKACH_GamePlayed3" + Convert.ToChar(2) + "QAPAACH_GamePlayed4" + Convert.ToChar(2) + "QAQAACH_GamePlayed5" + Convert.ToChar(2));
sendData("Dt" + "IH" + Convert.ToChar(1) + "FCH");
 
 
permalink
 

 
Average Member

Rank: Omicron


Reply With Quote
 
Join Date: Nov 2008
Posts: 60
11-09-2008, 01:58 AM
 
vista4life are you dutch?
 
 
permalink
 

 
RUN KIDDIES RUN

Rank: Member


Reply With Quote
 
Join Date: Mar 2007
Location: netherland
Posts: 612
11-09-2008, 01:59 AM
 
Quote: Originally Posted by cecer1 View Post
If you really want guides send me a PM explain why it is needed (I want a good reason not because it is cool) and I might code it
i just need it because i have more then 100+ users online and i like to work with ah good server:) if you don't make the guides why we started then? :P

Quote: Originally Posted by goldboy77 View Post
vista4life are you dutch?

Yes i'm from holland it's it my english i know it's crap but stay on the topic plz ^_^

a new code for you guys goodluck with it
PHP Code:
                        case "D":
                            {
                                try
                                {
                                    
virtualUser Target userManager.getUser(DB.Stripslash(currentPacket.Substring(4)));
                                    if (
Target._Rank 3)
                                        return;
                                    
DB.runQuery("INSERT INTO user_ignores(userid,targetid) VALUES ('" userID "','" Target.userID "')");
                                    
ignoreList.Add(Target.userID);
                                    
sendData("FcI");
                                }
                                catch { }
                                break;
                            }

                        case 
"EB":
                            {
                                try
                                {
                                    
virtualUser Target userManager.getUser(DB.Stripslash(currentPacket.Substring(4)));
                                    if (
Target._Rank 3)
                                        return;
                                    
DB.runQuery("DELETE FROM user_ignores WHERE userid = '" userID "' AND targetid = '" Target.userID "'");
                                    
ignoreList.Remove(Target.userID);
                                    
sendData("FcK");
                                }
                                catch { }
                                break;
                            } 

Last edited by Hammad; 11-09-2008 at 12:31 PM.
 
 
permalink
 

 
Average Member

Rank: Omicron


Reply With Quote
 
Join Date: Nov 2008
Posts: 60
11-09-2008, 02:00 AM
 
ik ook maar mag ik je wat vragen
 
 
permalink
 

 
RUN KIDDIES RUN

Rank: Member


Reply With Quote
 
Join Date: Mar 2007
Location: netherland
Posts: 612
11-09-2008, 02:03 AM
 
Quote: Originally Posted by goldboy77 View Post
ik ook maar mag ik je wat vragen
yes sure but don't spam this topic pm me :)
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Mar 2008
Location: Habbz Hotel
Posts: 367
11-09-2008, 02:04 AM
 
Quote: Originally Posted by vista4life View Post
yes sure but don't spam this topic pm me :)
Release the MYSQL Table for those codes you posted?
 
 
permalink
 

 
Alpha Member

Rank: Alpha Member


Reply With Quote
Blog Entries: 4
 
Join Date: Jan 2008
Location: CS:S
Posts: 1,890
11-09-2008, 03:01 AM
 
Quote: Originally Posted by VashMaster View Post
@ cecer1: Yes, the CMS is running even faster than before ;)

@ mychemicalself: Yeah, the server is sometimes running fine for 3 minutes without one message, and sometimes even 1 minute full of those messages.. Maybe it gas something to do with the amount of users online? Nillus also wtf'ed at this one..
Quick sugestion up your maximum MySQL connections by 100 or so
then increse the buffer in size and see if that changes it for the effects to happen the mysql server will need to be restarted :P
 
 
permalink
 

 
Monster Member

Rank: New Blood


Reply With Quote
 
Join Date: Oct 2007
Location: Netherland
Posts: 176
11-09-2008, 10:25 AM
 
Does anyone have a good catalogue for this? My catalogue is crap ;l
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Aug 2006
Location: Some place in england
Posts: 286
11-09-2008, 11:28 AM
 
PATCH
This will fix a possible DB connection leak.

In virtualUser.cs replace:
PHP Code:
                        case "@f"// Messenger - decline friendrequests
                            
{
                                if (
Messenger != null)
                                {
                                    
int Amount Encoding.decodeVL64(currentPacket.Substring(3));
                                    
currentPacket currentPacket.Substring(Encoding.encodeVL64(Amount).Length 3);

                                    
Database dbClient = new Database(truefalse144);
                                    
//if(Amount == 1)
                                    //    dbClient.runQuery("DELETE FROM messenger_friendrequests WHERE userid_to = '" + this.userID + "' AND requestid = '" + requestID + "' LIMIT 1");
                                    
for (int i 0Amounti++)
                                    {
                                        if (
currentPacket == "")
                                            return;

                                        
int requestID Encoding.decodeVL64(currentPacket);
                                        
dbClient.runQuery("DELETE FROM messenger_friendrequests WHERE userid_to = '" this.userID "' AND requestid = '" requestID "' LIMIT 1");
                                        
currentPacket currentPacket.Substring(Encoding.encodeVL64(requestID).Length);
                                    }
                                    
dbClient.Close();
                                }
                                break;
                            } 
With this
PHP Code:
                        case "@f"// Messenger - decline friendrequests
                            
{
                                if (
Messenger != null)
                                {
                                    
int Amount Encoding.decodeVL64(currentPacket.Substring(3));
                                    
currentPacket currentPacket.Substring(Encoding.encodeVL64(Amount).Length 3);

                                    
Database dbClient = new Database(truefalse144);
                                    for (
int i 0Amounti++)
                                    {
                                        if (
currentPacket == "")
                                        {
                                            
dbClient.Close();
                                            return;
                                        }
                                        
int requestID Encoding.decodeVL64(currentPacket);
                                        
dbClient.runQuery("DELETE FROM messenger_friendrequests WHERE userid_to = '" this.userID "' AND requestid = '" requestID "' LIMIT 1");
                                        
currentPacket currentPacket.Substring(Encoding.encodeVL64(requestID).Length);
                                    }
                                    
dbClient.Close();
                                }
                                break;
                            } 
And recompile
 
 
permalink
 

 
The sun shines :D

Rank: Member


Reply With Quote
 
Join Date: Sep 2007
Location: Netherlands
Posts: 284
11-09-2008, 12:09 PM
 
Tank you! The fix works

EDIT:
I have this error:
 
 
permalink
 

 
Monster Member

Rank: New Blood


Reply With Quote
 
Join Date: Oct 2007
Location: Netherland
Posts: 176
11-09-2008, 12:27 PM
 
Banning with the MOD tool = disconnect.

EDIT:
Some times is the database connection crashing:
12:29:59:728] [gameSocketServer.freeConnection] » Flagged connection [31] as free.
[12:29:59:753] [userManager.removeUser] » User [260] disconnected.
[12:29:59:756] [gameSocketServer.freeConnection] » Flagged connection [7] as free.
[12:30:09:375] [gameSocketServer.connectionRequest] » Accepted connection [7] from ***
[12:30:09:647] [virtualRoom.cycleStatuses] » De objectverwijzing is niet op een exemplaar van een object ingesteld.
[DATABASE ERROR] => Connection unexpectedly terminated.
[DATABASE ERROR] => FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
[12:30:14:198] [Database.getTable] » Database connection not active
[DATABASE ERROR] => FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
[12:30:14:204] [Database.getTable] » Database connection not active
[DATABASE ERROR] => Connection unexpectedly terminated.
[DATABASE ERROR] => FAILED TO SAVE ERROR TO FILE: Reading from the stream has failed.
[12:30:17:196] [[12:30:17:198] [Database.getTableDatabase.getString] » ] » Database connection not active
Database connection not active
[12:30:17:200] [Database.runQuery] » Database connection not active
[DATABASE ERROR] => [DATABASE ERROR] => [DATABASE ERROR] => [DATABASE ERROR] => [DATABASE ERROR] => FAILED TO SAVE ERROR TO FILE: Conne
ction unexpectedly terminated.
FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
Connection unexpectedly terminated.
FAILED TO SAVE ERROR TO FILE: Reading from the stream has failed.
[12:30:22:486] [[12:30:22:488] [[12:30:22:487] [Database.getStringDatabase.runQuery[12:30:22:492] [Database.findsResult] » Database.run
Query] » ] » ] » Database connection not active
Database connection not active
Database connection not active
[12:30:22:499] [[DATABASE ERROR] => Database connection not active
Database.runQueryFAILED TO SAVE ERROR TO FILE: Reading from the stream has failed.
[12:30:22:504] [[12:30:22:503] [Database.runQuery] » Database connection not active
roomManager.removeRoom] » Database connection not active
] » Room [4748, publicroom: false] destroyed.
[12:30:22:559] [virtualRoom.Finalize] » .
[DATABASE ERROR] => Connection unexpectedly terminated.
[DATABASE ERROR] => FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
[12:30:23:198] [Database.findsResult] » Database connection not active
[DATABASE ERROR] => FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
[12:30:23:204] [Database.getTable] » Database connection not active
[DATABASE ERROR] => FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
[DATABASE ERROR] => [DATABASE ERROR] => FAILED TO SAVE ERROR TO FILE: Reading from the stream has failed.
[12:30:23:213] [FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
[DATABASE ERROR] => Database.getRow[DATABASE ERROR] => [DATABASE ERROR] => ] » FAILED TO SAVE ERROR TO FILE: Connection unexpectedly te
rminated.
[12:30:23:216] [FAILED TO SAVE ERROR TO FILE: Reading from the stream has failed.
[12:30:23:215] [Database.getTable[12:30:23:221] [userManager.removeUser] » ] » Database connection not active
Database connection not active
[DATABASE ERROR] => [DATABASE ERROR] => [DATABASE ERROR] => [DATABASE ERROR] => FAILED TO SAVE ERROR TO FILE: Connection unexpectedly t
erminated.
FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
FAILED TO SAVE ERROR TO FILE: Reading from the stream has failed.
Database.runQuery[DATABASE ERROR] => ] » FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
FAILED TO SAVE ERROR TO FILE: Reading from the stream has failed.
FAILED TO SAVE ERROR TO FILE: Connection unexpectedly terminated.
User [52] disconnected.
[12:30:23:234] [[12:30:23:235] [Database connection not active
[12:30:23:239] [[12:30:23:243] [Database.runQueryDatabase.getTableDatabase.getTabl eDatabase.getTable] » [12:30:23:244] [] » [12:30:23:2
44] [] » ] » Database.findsResultDatabase connection not active
Database connection not active
gameSocketServer.freeConnection] » Database connection not active
Database connection not active
Database connection not active
] » Flagged connection [91] as free.
[12:30:23:331] [Database.runQuery] » Database connection not active

And with like 5seconds is the connection back.

- Goodwill
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Aug 2006
Location: Some place in england
Posts: 286
11-09-2008, 12:52 PM
 
Quote: Originally Posted by allard100 View Post
Tank you! The fix works

EDIT:
I have this error:
I will look into it after I fix this possible security hole.

EDIT 2:
Did you empty your furniture table but not your furniture_moodlight table?
If so then that could be the problem... I can't see any other cause as it only runs that query when you buy a moodlight.




EDIT 1:
Ok here is the new code.
URGENT UPDATE
I recommend doing this ASAP as it has now been released and may be exploited.

Replace:
PHP Code:
                        case "C~"// Sound machine - burn song to disk
                            
{
                                if (
_isOwner && Room != null && Room.floorItemManager.soundMachineID 0)
                                {
                                    
int songID Encoding.decodeVL64(currentPacket.Substring(2));
                                    
Database dbClient = new Database(truefalse123);
                                    if (
_Credits && dbClient.findsResult("SELECT id FROM soundmachine_songs WHERE id = '" songID "' AND userid = '" userID "' AND machineid = '" Room.floorItemManager.soundMachineID "'"))
                                    {
                                        
DataRow dRow dbClient.getRow("SELECT title, length FROM soundmachine_songs WHERE id = '" songID "'");
                                        
string Status Encoding.encodeVL64(songID) + _Username "\n" DateTime.Today.