View Full Version : Internet Event Server 100% cpu usage
Ron
October 13th, 2002, 12:55 PM
How are you connecting to it ?
Ron
October 13th, 2002, 12:55 PM
Sounds like a little error in the C# code. give it a check to see if it actually sends the "close" command. I think that is the problem.
Ron
October 13th, 2002, 12:55 PM
there is a little misunderstanding, the "close" that I was refering to is not the closing of the IP port but actaully sending "close\n" before closing the connection. That will solve the problem.
Ron
October 13th, 2002, 12:55 PM
Could you send me the updated c# file ? That way the next guy/girl ;-) doesn't have to figure this out too.
Brain
October 13th, 2002, 12:55 PM
Windows 2000
Girder 3.2.5pre1
Only plugin running: internet event server
When I run the internet event server, after a few min. girder goes up to 100% cpu usage all the time. It will run a few commands perfectly, and then take go to 100%. If I turn off the event server, girder runs fine.
Is there something I can do to keep this from happening?
Brian
Brain
October 13th, 2002, 12:55 PM
I am using the C# code you provided, connecting to it from my development server and from an Audrey.
I put the C# connection code into a page with an ON and OFF button that fires a CM11A event to turn a light on and off. It works great for a little while (5 min? ), and then it starts showing 100% cpu usage. I tried it without the CM11A event, and just used an OSD event to make sure it works. It did the same thing.
Oh yeah, I tried it on my XP laptop, and the same thing happend ( I have .NET on the laptop too.. )
I thought at first it might be some sort of .NET autopost problem ( continually sending the page? ). But the page still works when girder shows 100% cpu usage, it just takes about 10 seconds for the command to work. Usually, when under normal cpu action, the command is almost instant.
Brain
October 13th, 2002, 12:55 PM
Thanks RonB...
I'll give it a look tonight.
Brain
October 13th, 2002, 12:55 PM
I couldnt wait till tonight... what else is work for?
I stepped thru it here at work, just having Girder open a notepad on the event. Each time, it did execute the line "tcpClient.Close();" So it should be sending the close command.
Stepping thru the code, after just 2 tcp events, girder went to 100% usage.
I am going to compare the origional code with my code and see if there is something else I am missing...
Brain
October 13th, 2002, 12:55 PM
I looked at the code. Couldnt see anything different...
BUT...
I made a new console project, with the code AS GIVEN, no changes made at all. Ran the code from the command line, started up a couple of notepads from girder, and WHAM... the same 100% usage.
Point being: the origional, unmodified code does the same thing to me.
Is there anyone else out there using C# and the internet server to run girder?
[update]
Running the included ieventc.exe file does not cause this problem, so it must be the way the C# code is working. I rewrote it just the way that MSDN suggested, and even tho girder did not execute anything ( it recieved a tcp event, but didnt do anything with it... I might have sent the data wrong, but girder saw it and went to 100% ), I still got the 100% cpu usage.
Brian
Brain
October 13th, 2002, 12:55 PM
I might be jumping the gun here, as I have only tested it 5 or 6 times, but I declare SUCCESS!
Here is what I had to add to the C# code to get girder off the 100% cpu usage problem. Right before the tcpClient.close() command, I had to close the input and output streams:
if (accept_result.Equals("accept"))
{
output.WriteLine(event_string);
output.WriteLine("close\n");
}
output.Close();
input.Close();
Thank you, RonB for all of your help. You're great!
Brain
October 13th, 2002, 12:55 PM
I send the code in a PM. If you want it some other way, let me know...
I tried the newly edited command line C# file here at work, and it has not yet had the 100% cpu usage problem.
Thanks!
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.