Error Source 5519+ CPU Consume 100%

09/19/2011 23:02 rigoberto12r#1
My server gets to the line 15 and 25 and held in 15 and 30 CPU power but eventually rises to 100% and no more low
no one can enter and latency increases to 10 000 and then I have to restart and that's all the time with any server 5515 +

My pc
AMD 4200+ 2.2 dual
3gb ram ddr2
window server 2008
3 mb internet

I'm using server [Only registered and activated users can see links. Click Here To Register...]

BaussHacker where to place your code more or less
I would publish a more stable server
09/20/2011 10:53 BaussHacker#2
Check that you haven't got any while loops running without a thread sleep.

Code:
// This will eat all your cpu
while (true)
{
     // Do something
}

// This will not eat your cpu
while (true)
{
    // Do something
    System.Threading.Thread.Sleep(1);
}
It's one thing I have forgot before and the cpu raised to 100% :P

If it's not that then have you changed anything? If so, what and have it always done it?

We need some more information to help you.
09/20/2011 11:41 -impulse-#3
Quote:
Originally Posted by BaussHacker View Post
Check that you haven't got any while loops running without a thread sleep.

Code:
// This will eat all your cpu
while (true)
{
     // Do something
}

// This will not eat your cpu
while (true)
{
    // Do something
    System.Threading.Thread.Sleep(1);
}
It's one thing I have forgot before and the cpu raised to 100% :P

If it's not that then have you changed anything? If so, what and have it always done it?

We need some more information to help you.
Because his processor is dual, with your code only 50% will be constantly used, which means he got something async related that gets in something like you described. And I say async because if one async thread doesnt finishes its job there another thread ready to do the work, and if all threads get stuck in the same spot, it will not only use 100% but also lots of memory(ram) if not set a pool size. And because all async threads are used you wont be able to login / play because there's no one to take your requests and pass them through to the packet handler.
09/20/2011 12:28 BaussHacker#4
Quote:
Originally Posted by -impulse- View Post
Because his processor is dual, with your code only 50% will be constantly used, which means he got something async related that gets in something like you described. And I say async because if one async thread doesnt finishes its job there another thread ready to do the work, and if all threads get stuck in the same spot, it will not only use 100% but also lots of memory(ram) if not set a pool size. And because all async threads are used you wont be able to login / play because there's no one to take your requests and pass them through to the packet handler.
Didn't know that. Thank you :)
10/13/2011 15:19 rigoberto12r#5
This server I upload the cpu in any type of computer quad core, dual core, pentium 4
I go to Server 5375 because I do not turn up the cpu but has some bugs xD
10/13/2011 15:53 diedwarrior#6
Just convert stuff from 5519 to 5375, thats what i do ^^.
10/13/2011 17:43 Lateralus#7
Make sure you're properly closing the connection when transferring the character from auth->game server.
10/13/2011 23:34 DontSpeakToMe#8
try to make kill connections that will help you so much