|
Joined: Mar 2007
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Mar 2007
Posts: 4 |
I run two copies of mirc, both in seperate folders and neither reading anything from the others files, and have yet to have an issue with it.
I run 1024 mb ram, 3ghz pentium 4, and mirc.exe is taking up anywhere from 30-40% of the processor, each. This is only recent, and I don't think it's my windows install going coruppt; There's serious system lag, and I did a reinstall of both mirc and windows to make sure.
One of the copies is a bot so I checked if I'd somehow started a loop, timer, etc automation I shouldn't off and it all works out, same with my other instance(the non-bot one).
Anyone have any ideas? All help greatly apprciated.
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
Heh. The same thing has been happening to me lately. It might be because I am usually on 65+ channels over 1 network and a lot of people using commands might take up a bit CPU especially if most of your scripts are sockets. About 2X a day my bot's mIRC locks up while minimized and the bot's ping Timeout. This means I must end the process manually and re-boot mIRC. Does anybody have any solutions to this because I think it would help me and Jedisbar greatly
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: May 2005
Posts: 7
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: May 2005
Posts: 7 |
omg I've got the same problem, I run 1024mb ram and pentuim 4 too, and the mIRC still takes too much from my CPU power and like you I always think its cuz of the timers, loops and shit but i cant find an answer. I'm joining to the question
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
First thing you should do, is see if the same thing happens with no scripts loaded. If the problem doesn't show up, then keep trying it, using one script at a time until it reappears. NOTE: It'd be best to check each script one at a time (ie:load one, test it, if the problem doesn't occur, unload the script, load the 2nd, etc.)
If the problem reappears doing it like that, then the script that you just loaded is part (if not all) of the problem. If it doesn't show up, then try loading various sets of scripts (ie:1 & 2, 1 & 3, 1 & 4, 2 & 3, 2 & 4, 3 & 4,...)
Just keep trying various combinations until the problem reappears. Once the problem reappears, then we (should) have an idea as to which script(s) is/are causing the problem and we can review the script and see if it can be improved (odds are, if a script is causing that much usage, then it can be improved)
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Specifically for you, check your socket scripts to ensure that the sockets are open for the smallest amount of time possible. Next, consider reducing the number of channels that you're on, or possibly set up a second/third installation of mIRC to handle some channels. Thirdly, consider adding restraints so that you don't get (for example) 50 people sending the same command at the same time.
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
I do have a flood protection script that ignores a user if they post 3 lines in 5 seconds. I will check on the socket scripts, though. Thanks a lot!
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Mar 2007
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Mar 2007
Posts: 4 |
Loaded up my client version, unloaded all scripts and restarted it. Same problem, seems worse now with 50% useage. Made a fresh, completely untouched by anything install... same problem.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Just to test, try temporarily disabling your firewall and antivirus/antispyware/antitrojan software and run mIRC. See if the CPU usage is still high. Once you know, you can enable those again. As long as you're not using the web and don't type weird stuff in mIRC that people may tell you to write, you don't need to worry about disabling those temporarily.
Also, when does the CPU usage go up? Is it when mIRC's running, but not connected? Is it when it's connected to multiple channels, or just one? Is it while sending or receiving files? More specific information would help. I run 2 copies of mIRC. My bot uses 0% cpu at all times, and Invision uses 3-5% due to a lot of hash tables (something I still need to try and cut down at some point).
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Mar 2007
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Mar 2007
Posts: 4 |
Already done the anti-virii step, no effect.
Clients on 2 servers, multi channels each, bot's on 2 of the same, same channels I'm already in. I haven't got a clue what the trigger is, sometimes it's that large from the word go, sometimes it takes a few minutes to kick in, sometimes hours. I am beginning to suspect mircstats may be part of the problem, since that's begun to hang but I'm not sure if that's a cause or an effect of this, I haven't changed a setting on any of this and it just started happening.
|
|
|
|
Joined: Jan 2007
Posts: 1,156
Hoopy frood
|
Hoopy frood
Joined: Jan 2007
Posts: 1,156 |
I am curious if you use hash tables. How many hash tables do you use, what is the size vs. amount used.
Also, what dll's do you use.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I know a person on Maximum-IRC that runs mircstats, but I don't know if he's run into these problems or not. I'll ask next time I see him.
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
I have several hash tables. My seen.hsh is almost 5 megs worth of data, may that be a problem. All the other hash tables are fairly small. I dont use any DLL's on my bots mIRC excepct Open SSL where the DLL isnt even in the folder.
Also the sockets arent the problem. I tested each one.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Quite likely, since hash tables are stored in RAM until they are freed, either by mIRC closing or the /hfree command being used.
You should check the amount of RAM you're starting with, and see how much other programs are using. If the total RAM being used is more than about 50% of your total RAM, then your system is (or should be) using a swap file, which means disk access, which, as I've said before, is extremely slow.
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
Ahh! Yes! Hash Tables are stored in RAM. I hadn't thought of that! Maybe I should clear them or seperate them, or use an INI file. Woot! Thanks! I think you found my problem!
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
That's the issue I mentioned with Invision. It has a lot of tables, so it uses extra CPU (not much, but noticeable if you look at the task manager). I'm curious about the 5MB table. What's it for? Hash tables are good for data that is used frequently (usually, that means that the table is fairly small). If you have data stored that isn't used often, then saving it to a file is probably better.
You could easily find out if that's the problem by freeing the table and checking your CPU usage.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
The hash table was used in my seen script that I had created for my bot. Imagine, a hash table last cleared when the bot/script was created (December 10th, 2006) and on average the bots are on 65 channels with 35 users on average, peaking at over 100 channels. After a few months the amount of unique users my bot is going to see are extremely high, which is why the hash table was 5.56 megs. I just free'ed and deleted the hash table so we can start clean. Now its at 4 kb Hopefully this will solve the problem. *Keeps his fingers crossed* Again, thanks for all the help.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
You may want to have the table automatically clear anyone who hasn't been seen in over 2 or 3 months or something.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
I could do that. I do store the $ctime in the hash. If I periodically check to see if $ctime - CTIME is over 2419200 seconds (4 weeks), remove that item. Again, another good idea that I could easily implement.
Again, Thanks.
EDIT: This might be a problem if you have 10,000 unique items in the hash. A while loop might not be the best way to attempt this. Any ideas?
Last edited by Spitfire3292; 02/04/07 01:34 AM.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
If you have a commonality in the item names for these items, then you might be able to use /hdel -w <wildcarded item name>
See /help /hdel for more details.
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
Each item is a different address mask. Then for each value of the item I use $gettok. I guess in this case /hdel wouldn't help me.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
No, it doesn't sound like it would be. I'm out of ideas at the moment, but if I think of anything I will post.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
You could save the hash table to a file, /filter it, manually delete all lines at the top or bottom (depending how you filter it), then load it again. That shouldn't take more than 5 minutes and won't "lock" mIRC while looping.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
You could save the hash table to a file, /filter it, manually delete all lines at the top or bottom (depending how you filter it), then load it again. That shouldn't take more than 5 minutes and won't "lock" mIRC while looping. interesting idea but the downside to that is that I have no idea how to use the /filter command, *goes off to the Help Guide*
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Mar 2007
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Mar 2007
Posts: 4 |
So I've just noticed that explorer.exe is taking up about 20% cpu versus it's normal 10 or so percent. Possible connection?
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Possibly. Explorer tends to take up extra resources if it crashes or if another program hangs.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
Ok its not the hash table taking up the space because I just cleared it and it just locked up, and the seen.hsh is 100 bytes :\
i think its a while loop that is being kinda stupid.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Definetely a possibility. If you want to post that section of your code in a new topic in the Scripts & Pop-ups forum, I (and I'm quite sure several others) will be happy to look at it and see if we can come up with something better.
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
That's just it. I don't know what section of code it is. I have about 60 files, 1 file per feature of my bot. I have several while loops in several different files. I was trying to back-track earlier to see what I could've added to make it mess up like this, but couldn't find anything.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Although it will take time to do, I would go through and test one file at a time -- install one script and see if you have the problem. If not, uninstall it and install another one. Yes, it will take a lot of time to test all of them (unless you're lucky and it's the first one you test), but unless you can figure out where the problem is, that's your only real solution.
Just a note, though... You might try using Ctrl-Break when you're having problems (hit it 4-5 times in a row). Then, see if you see any error messages (check status and your active window). If so, that should give you an idea of where the error may be located.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
I don't know how ctrl-break would work when your mIRC is minimized to your tray when it happens.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
As far as I know, mIRC uses CTRL + BREAK as an global shortcut, meaning it wouldn't matter when you press it. I'm not exactly sure, though.
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Ctrl-Break works even when mIRC's minimized to the tray. Though I don't remember you saying that this only happens if it's minimized... if that's the case, that would be useful information to have when helping you.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
I always minimize my Bot mIRC just so its not taking up a tab space in the Windows ToolBar.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
But, does it happen when it's not minimized? And did you try Ctrl-Break to see if it gives a message? I suggested trying it and you said you couldn't because it was minimized, which made no sense.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
It hasnt locked up in over a day now. Maybe it's fixed, although I didn't do anything. We will see what happens over break. And if ctrl-break works globally, if I had several mIRC's open and only wanted one to break, how would I do it? Just thought a global ctrl-break would be kind of silly in that case.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Well, it's just global if nothing is "active" in Windows. If you have everything minimized (or at least, not active), then it's global. If one mIRC (or another program) is maximized/active, then it's specific to that program. I believe this is a standard Windows behavior. In any case, this has allowed me to reopen a frozen mIRC that was minimized to the tray without having to kill the process.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Mar 2007
Posts: 60
Babel fish
|
Babel fish
Joined: Mar 2007
Posts: 60 |
Very intersting. I have been having to kill the process everytime this happened. Surprisingly it hasnt happened in over 2 days. I am curious as to what the problem was, but if it doesn't do it anymore thats just fine by me.
"In order to succeed, your desire for success should be greater than your fear of failure."
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Just remember that ctrl-break works if there is a loop or similar thing going on. If it's not script related, it probably won't help.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
|