Resolved Account instance sticks for multiple hours after closing?

Discussion in 'Client & Site Support' started by Mad, Mar 3, 2016.

  1. I have 12 instances, and it won't let me run any clients at the moment because it says I have reached my limit of 12, even though not a single client has been running for over an hour.

    Why does the instance stick for so long? What can I do about this?

    @Cloud @Arbiter
     
  2. A session will only last 15 minutes after it has been unsafely terminated. If it is safely terminated (with the X button) the session will close immediately. Make sure you don't have any extra java.exe processes running in the background. A fresh restart is always a good idea if you can't figure out how to view your processes.
     
  3. I was having this issue before I stopped using RM until Spectre.


    After 15 minutes, the session would still be in use. I remember one of my scripts bots having a NPE in it I was trying to fix, every time i'd start my script bot it'd instantly stop but the server would think the script bot would still be running. So I'd terminate all java.exe processes and start the client again (I should still have one session available to do some testing), but it'd tell me all my sessions are in use. It said that for several hours after, I remember bugging someone in Slack to terminate all my sessions manually.

    It'd even do it when I just ran a script bot that worked perfectly fine. I think it was doing it when i'd close the client completely, instead of stopping the bot first, then closing. Would say I don't have anymore sessions available when I was only running one script bot, and it'd continue to say that for sometimes the entire day.
     
    #3 Twinki, Mar 4, 2016
    Last edited: Mar 4, 2016
  4. All the java processes are being destroyed because my VPS's are being rebuilt every 30 minutes, the clients are being unsafely closed, but there aren't any java processes open. I can't manually close them due to them being on a remote server. It seems that all yesterday, for over 6 hours it said I was using all 12 instances when I didn't have any running.

    Hope this can be resolved, kind of puts a damper on the botting since I can't run any clients.
     
  5. Why are your VPS's being rebuilt every 30 minutes? This would mean that the RuneMate clients are being forcefully closed every 30 minutes which would only leave a 15 minute window since a session will remain for 15 minutes if closed forcefully.
     
  6. Why are they being rebuilt every 30 minutes?..
     
  7. They are being rebuilt because I need fresh IPs.

    I remove the vps's (closing all the clients), then wait 15 mins to rebuild, so it gives about a 20 minute window before it tries to re-open runemate, but still doesn't seem to let me.
     
  8. Why do you need fresh ip's every 30 minutes... Don't you think that's just a little bit insane...
     
  9. This. Plus, there are other methods to switch IP's.
     
  10. Just saying, there is really no such thing as "fresh" IPv4 anymore. We've been recycling the same IPv4s for years now. I am not saying all IPs are flagged by Jagex, but sometimes getting a "fresh" IP is a bad idea. Especially if you are getting the IPs from the same provider they are most likely just circulating a few blocks from RIPE.
     
  11. The IP's aren't the issue I'm having, it doesn't have anything to do with the runemate instances, my system is setup perfectly for how I need it, just one issue of the instances not letting me run a bot :(
     
  12. It is because of that though... You said it yourself, you're forcefully shutting down the instances. We're just wondering why you think you need to change IP so often because honestly, changing that often would attract attention which i'm guessing is the opposite of what you're aiming for.
     
  13. You are missing the point, the IP's are not relevant to the situation. Even if I forcefully shut down and instances on the same IP, it still would have the same result.
     
  14. This isn't really on-topic though. This is a bug report, and I can confirm that this same thing was happening to me. Even after 15 minutes, the sessions aren't closing. They stay active, it took nearly a full 24 hours for my unsafely-closed sessions to correctly close and become available.
     
  15. I'm assuming you have written some sort of code that automates the destruction and creation of servers for you. If that is the case then you should code into it some mechanism of safely shutting down the client before destroying. This can be done a number of ways including, but not limited to, SSHing into the server and shutting down the process nicely (SIGTERM) or having a cronjob on the server check for a signal of your choice (such as instructions from a webpage) to kill process and shut down. This isn't impossible; it's just a matter of changing your process flow. From our end there isn't much we can do. If you unsafely shutdown we have no way of knowing the state of the session until it naturally expires.

    @Twinki I would prefer if we dealt with your issue separately and after you find a consistent way to reproduce like the OP has.
     
  16. The app I have destroys RuneMate running by calling System.exit, there isn't really a way that I can manually click the X button, and no real way to programmatically do it afaik, unless it is apart of the runemate API?
     
  17. System.exit is a safe way to shutdown, so if you're using that the issue is elsewhere. What is likely happening is that you are destroying the server (forcefully) before the client has a chance to safely shut down. You can test this theory by delaying the server shutdown by X minutes, allowing time for the JVM to shutdown in response to your System.exit call. Once/If that works you can move on to optimizing that X minutes by doing something like checking for java processes in a loop before destruction. If that does not work, which I'm relatively confident it will, please come back, and we'll go over your implementation and create a test case.
     
  18. I'll give it a shot, I wasn't aware that system.exit was a safe way to do it. Thought maybe the instance was only terminated by an onClick or something on the exit button. Thanks.
     

Share This Page

Loading...