Register for your free account! | Forgot your password?

You last visited: Today at 13:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Simple MySql Pool handler

Discussion on [Release] Simple MySql Pool handler within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 07/15/2011, 18:31   #31
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
thanks fang .... it is very useful I will do it in your way.....

Quote:
#region Kill Sleeping Connection
private void Loop()
{
int count = 0;
while (1 > 0)
{
Sleep(2000);
count++;
if (count > 29)
{
Conquer_Online_Server.Database.KillConnections.Kil l();
count = 0;
}
Sleep(Milliseconds);
}
}
#endregion
Fang I have come up with that code, is that correct? and put it in the thread system
marlyandedsel is offline  
Old 07/16/2011, 21:05   #32
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
try something like this...
Code:
while (true)
{
     Database.KillConnections.Kill();
     Thread.Sleep(30000); // Sleep for 30 seconds 
}
Make sure that it's on its own thread though. Do NOT put it on the main thread or it'll lag your server.
Spirited is offline  
Thanks
1 User
Old 07/17/2011, 00:53   #33
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
thanks fang..... thanks very much
marlyandedsel is offline  
Old 07/17/2011, 22:31   #34
 
elite*gold: 0
Join Date: May 2009
Posts: 7
Received Thanks: 0
Fang please give you yahoo or mensseger my is
alanpk2009 is offline  
Old 07/18/2011, 00:35   #35
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by alanpk2009 View Post
Fang please give you yahoo or mensseger my is
It's not public for a reason.
I'm not going to guide you on how to do this for your source. You need to think it through and implement it using the C# you know.
Spirited is offline  
Old 07/18/2011, 02:42   #36
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
Fang I did something like this

1.I have put public static for ServerManagement as a new thread that run every 30 sec
I put in the program class

2.I called the ServerManagement as a New Action and I called it like ServerManagement.start();

3. I create a static void for ServerManagement_Execute()
inside it i call the Database.KillConnection.Kill();

its very useful, it slow the memory usage of the server every time the server call that, and its working fine... thanks fang.......
marlyandedsel is offline  
Old 07/18/2011, 02:48   #37
 
elite*gold: 0
Join Date: May 2009
Posts: 7
Received Thanks: 0
please need help
alanpk2009 is offline  
Old 07/18/2011, 03:47   #38
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
like fang he said, you have to think of it and learn how to do it okay ? thats what I do lol......
marlyandedsel is offline  
Old 07/18/2011, 06:15   #39
 
elite*gold: 0
Join Date: May 2009
Posts: 7
Received Thanks: 0
just want to ask you a question
alanpk2009 is offline  
Old 07/26/2011, 20:21   #40
 
elite*gold: 0
Join Date: Mar 2009
Posts: 17
Received Thanks: 0
where can i add them plz Help me
zzaki201065 is offline  
Reply


Similar Threads Similar Threads
[Release] Neo305´s Easy WoW Server Handler 4.0.6a
04/26/2013 - WoW Private Server - 61 Replies
Neo305´s Easy WoW Server http://img200.imageshack.us/img200/537/handlerr.p ng Ich biete euch hier einen fertigen WoW Cataclysm 4.0.6a Server mit Handler. Wie man ihn benutzt, steht in der README Datei.
[Release] Simple MsSql Handler
05/10/2011 - CO2 PServer Guides & Releases - 12 Replies
I'm going back to MySql because I like it better. Here's the sql handler I was using that works with Sql Express (When you install Visual Studio): namespace 数据库 { using System; using System.Data.SqlClient; public static class Connection {
Dauer MySQl Error mit 2.4.3 Mangos Handler!
03/11/2011 - WoW Private Server - 1 Replies
so ich bin langsam am verzweifeln -_- ich hab meine pts fertig, einzige prob was ich habe, jedesmal wenn ich meinen pc neustarte oder herunterfahre wieder hochfahre, starte ich meinen server und kriege dauernd "could not connect to mysql database" fehler .... da ist ne datei "exemod.dll" sie enthält angeblich einen virus mir wurde gesagt das is ne fehlmeldung, sie wird öfters gelöscht, und glaube es liegt daran das ich server net starten kann, musste ihn immer neuinstallieren das ich ihn...
[Release] event handler / system message for 5165 source
05/01/2010 - CO2 PServer Guides & Releases - 10 Replies
i was partially made this and completed by pringle, i dont know if pringle is in here in this forum. but still credit to him. Go to Program.cs and find:public static Random Rnd = new Random(); Above this add:public static DateTime SystemMsgTime = new DateTime(); scroll down and you found this static void ServerStuff_Execute() { try { if (World.BroadCastCount > 0 && DateTime.Now > World.LastBroadCast.AddMinutes(1)) {



All times are GMT +1. The time now is 13:46.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.