1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

KAG Fix the list error please

Discussion in 'Server Help' started by Leo, Apr 11, 2015.

  1. Leo

    Leo Haxor

    Messages:
    503
    Code:
    05:59:56] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [05:59:56] sAPIClientStatus.size() is 5
    [05:59:56]  < Nuking the list as a stop-gap >
    [06:00:26] getTokenValidation error: Curl Error: Couldn't connect to server
    [06:01:20] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:01:20] sAPIClientStatus.size() is 5
    [06:01:20]  < Nuking the list as a stop-gap >
    [06:02:20] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:02:20] sAPIClientStatus.size() is 5
    [06:02:20]  < Nuking the list as a stop-gap >
    [06:03:19] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:03:19] sAPIClientStatus.size() is 5
    [06:03:19]  < Nuking the list as a stop-gap >
    [06:04:18] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:04:18] sAPIClientStatus.size() is 5
    [06:04:18]  < Nuking the list as a stop-gap >
    [06:05:18] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:05:18] sAPIClientStatus.size() is 5
    [06:05:18]  < Nuking the list as a stop-gap >
    [06:06:17] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:06:17] sAPIClientStatus.size() is 5
    [06:06:17]  < Nuking the list as a stop-gap >
    [06:07:17] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:07:17] sAPIClientStatus.size() is 5
    [06:07:17]  < Nuking the list as a stop-gap >
    [06:08:16] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:08:16] sAPIClientStatus.size() is 5
    [06:08:16]  < Nuking the list as a stop-gap >
    [06:09:15] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:09:15] sAPIClientStatus.size() is 5
    [06:09:15]  < Nuking the list as a stop-gap >
    [06:10:15] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:10:15] sAPIClientStatus.size() is 5
    [06:10:15]  < Nuking the list as a stop-gap >
    [06:11:14] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:11:14] sAPIClientStatus.size() is 5
    [06:11:14]  < Nuking the list as a stop-gap >
    [06:12:14] WARNING: A call to update the server list API is showing as still in progress when we were ready to make the next call
    [06:12:14] sAPIClientStatus.size() is 5
    It has killed my servers two times already AFTER the latest update.
     
  2. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    Why does it have to crashes anyways?
    Can't it just cancel the "stuck" API call if that even happens? Or the current API code doesn't allow it?
     
  3. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Current API client code is a big big mess, mostly cause it's written by a python programmer who'd clearly taken some course in C years ago and applied that to C++. By the time we realised it was like that it was already "functional" and therefore unlikely to be replaced; as they say - "broken code gets fixed, bad code stays forever".
    The three people we've had "going to fix it" haven't. I don't want to because I want to move away from this engine, not invest more and more time into fixing bad code I didn't write. It's technically on the TODO list but it's under the heading "shame hole".

    Sorry for being frank about this.

    E: slightly more info - the current API client has no idea of "cancelling" actions, though it does essentially have "in flight" actions - the problem is (as the error messages suggest) that if one of them locks up for whatever reason (bad code, remember), it just sits in the "in flight" list forever, and whatever was waiting on it (99% of the time just a server status update) never gets completed. The "fix" (as it says, nuking the list) is so that it'll at least attempt more actions and not leak too much memory, but in general requires a full rewrite of the API client to get a clean solution. The actions as they are are relatively unsafe, global variable bound functions in threads; as you might imagine, them being unsafely ended (or ones after them starting and working on the same data) is what leads to the list filling repeatedly, and eventually crashes.
     
    Asu likes this.
  4. bunnie

    bunnie Haxor Tester

    Messages:
    1,319
    I had the same problem, but yesterday it fixed itself? since then my server is all ok, so i tried to host another server with same settings, but it is crashing. is there no way to fix it?
     
  5. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Not currently. Having a better connection on your end can help avoid the threads dropping but nothing's "100% fail safe". Most people run the server via a script that re-launches the game after it crashes. Joe (afair) also has a script that resets them if they're eating too much cpu/ram after posting a message to the game that the server will restart, but it's been a bit hit and miss functionality wise from what I've seen.
     
  6. bunnie

    bunnie Haxor Tester

    Messages:
    1,319
    For some reason it's on linux only? everyone i know had this problem on Linux. my friend @Chrispin hosted a Windows server with the same settings and it never crashed for him.
     
    Last edited: May 23, 2015
  7. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    its weird, I was hosting the gather sever and it kept happening everyday. somehow it just stopped happening and I was never able to retrieve the full back-trace by running it through a debugger.
     
  8. Leo

    Leo Haxor

    Messages:
    503
    It's random. A lag spike and there you go. A good host helps a lot.
     
  9. heX_

    heX_ Bison Rider

    Messages:
    193
    Boom, server crash.:rektlord: