Just in case anyone comes here looking for their in game statistics, I thought I would mention that there is an issue affecting about 10 recent players. If you can't find your player name in UTStats you will know that you are 1 that is affected by this.

I was attempting to merge players with aliases from the same IP address and either triggered a bug or failed to use the correct procedure. The result is that some players from different IP addresses have been combined when they shouldn't have been.

Today, I will work on restoring the database so that it has every player's stats recorded accurately.

Then I will look into the player merging to see if it can be fixed so that player aliases can be merged properly and top players with lots of aliases will not skew the player rankings. This part will take more time.

I will update this thread as things progress.

UTStats database is now restored. All player stats should now be accurate again, except of course player rank as mentioned earlier.

Now I just need to find out how to combine all the aliases without messing up the stats again 🙂

I did the same thing at one point on my site :
I feel for ya if you have to re-import it all

    Zim I feel for ya if you have to re-import it all

    Haha, thanks. Makes me feel a bit better about it. I went ahead and set up a test server for it re-imported everything there then dumped the database and restored it here. In a way it helped me get part of my backup plan together 🙂

    I've got a giant task ahead of me trying to get some order into 5 years of UTSTATS.
    My database has become so large the website will just crash if I attempt to recalculate rankings.
    Somewhere in the mids of 30K logs to deal with 😪

      I guess I will just make this the UTStats issue thread instead of clogging up the forum with UTStats threads. It seems there was an import problem this morning and the error message in the log is this:
      Importing weapon statistics: Out of range value for column 'damage' at row 1

      I had other import problems like this one that I had to fix before opening the site. One that I remember was someone's ping went out of range, that is the data type that the database used for pings wasn't able to handle the huge value that was in the logs. I made a php change to fix that issue and will hopefully be able to do the same for this damage issue. Eventually, I will be putting my changes in github for others to use but if anyone is reading this and would like to know how to fix an issue they are having now just post here about it or email me, I might have seen and fixed that error already.

      Hopefully, I will have time to fix this damage one today.

        admin changed the title to UTStats Issues.

        Pretty sure I know the cause and fix for this latest issue but stuck on mobile right now, my crappy inet is out again 😕

        snowguy Importing weapon statistics: Out of range value for column 'damage' at row 1

        I looked at this a little more and I'm reasonably certain that the cause of this error is from the total amount of ComboGib damage dealt by everyone in all matches so far as seen on the Totals page in UTStats https://eatsleeput.com/utstats/?p=totals in the Weapons Summary table.

        The value has become too large for the database data type for that field. Currently the total value is 4294845K that is 4 and some odd billion. The data type for this total damage value is unsigned int which has a maximum of 4294967295 (232-1). I should just be able to modify this data type in the database and make it unsigned bigint which will hold up to 18446744073709551615 (264-1) that should buy some time before hitting the new limit 🙂

        TLDR:
        The main cause here is that the combogib weapon deals much higher damages than normal weapons do so the total damage dealt by this weapon by everyone so far added up much more quickly than should normally have happened.

        Database type adjusted to bigint and imported the missing matches. All seems to be fine with this now. Priority shifts back to the merging alias issue when I get time to work on it again.

        • Zim likes this.

        How are you updating the stats?
        I use the trigger mutator on my servers main servers that update every match picking up any of the stray servers at the same time.
        Before that I used to run a screen process in Linux via a cron job every x mins with Lynx ( a terminal based web browser)
        Mind you I don't use nodestat's so I don't know if that's plausible or not. 🤔

        I made a few scripts to transfer and import the stats daily over sftp. I didn't really want to use ftp anymore and I saw that the trigger mutator relied on ftp so I didn't use that. That's a nice feature to have the matches updated at game end though. I might do something similar eventually.

        I really wanted to use a cronjob but I decided to embrace the systemd stuff and used a systemd.timer and systemd.service file instead.

        I'm using this version of utstats: https://github.com/sn3p/utstats merged with the pull request for php7. I think this newer version 4.4.2 mostly updated the view of the site and the majority of the back end is the same as the older version you are running.

        I also considered Ooper's Node UTStats 2 and will still probably run it in the future when it gets to a stable release.

        5 days later

        Another issue that arose after running UTStats with PHP7 was the server status page stopped working:
        https://eatsleeput.com/utstats/?p=squery&serverip=139.162.235.20:7777

        I fixed this recently and found that the cause was the split function, used in the servers_query.php file, was deprecated in php5 and removed in php7. A very good write up with details about this is given here: https://phppot.com/php/reasons-why-split-is-deprecated/

        If you happen to be running UTStats v4.4.2 with PHP7 here are the changes that worked for me by editing the servers_query.php file in the pages directory of utstats:

        Change line 6 from this:

        list($serverip, $serverport) = split(":", addslashes($_GET[serverip]));
        

        To this:

        list($serverip, $serverport) = explode(":", addslashes($_GET[serverip]));
        

        And also change line 62 from this:

        $chunks = split('[\]', $data);
        

        To this:

        $chunks = explode('\\', $data);
        

        That's all it took to fix this issue 🙂 I'll mention again that eventually I will be putting all of these changes in github and creating pull requests but for now I will just write about them here so anyone can use them now if they don't want to wait.

          snowguy Nice
          I'll have to have a look into that one, cheers.

          4 days later

          Yesterday, I was able to fix another issue affecting UTStats v4.4.2 and possibly other versions. After adding or removing a player to/from your watchlist, you are presented with the following page:

          The issue was that the player search presented on this page was not working. The search button would not respond to being pressed. Additionally, entering a name to search and pressing the Enter key did nothing. Thanks to bustacell for finding this issue and letting me know about it 👍

          After comparing the player search fields on other pages that were working to this one that was not, it was found that the following code was missing from this non-working search:

          <form name="playersearch" method="post" action="./?p=psearch">
          

          So I changed lines 40 and 41 in pages/players_info.php from this:

           echo '<div class="darksearch">Or search another player:<br>
              <span><input type="text" class="search square" placeholder="Search player..." name="name"><input class="searchbutton" type="submit" value="Search"></span></div></div>';
          

          To this: (with some rearrangement for improved readability)

          echo '<form name="playersearch" method="post" action="./?p=psearch">
                   <div class="darksearch">Or search another player:<br>
                     <span>
                       <input type="text" class="search square" placeholder="Search player..." name="name">
                       <input class="searchbutton" type="submit" value="Search">
                     </span>
                   </div>
                 </div>';
          

          Now the player search seems to work on that page. This wasn't the highest priority on the list of issues to fix but it seemed to be shallow enough to make me think it would be a quick fix which motivated me to work on it. 😅

          2 months later

          If you are still considering node utstats 2, I have started work on sftp support a few days ago, admittedly I've not touched node stats for several months after getting burnout from coding. As my dog died a few days ago I need something to keep me distracted, and playing ut when I'm really depressed just makes me a right grumpy bastard and I can take my frustrations out on people that don't deserve it.

          I can incorporate the combogib mods you run into node stats showing peoples combos for matches/profiles and have leaderboards and such for different events, or whatever people want.

            Ooper
            Sorry to hear about your dog. Yes, I'm still considering running node utstats 2. Actually, since I'm somewhat invested in UTStats v4.2.2 (I styled the rest of the site to match) I would like to run both and then people can decide which one they want to view. Since you are still actively developing yours and including additional information, I expect that eventually yours will be the only one that people will use.

            So, a few questions: Is Node UTStats 2 decently mobile friendly? Have you preserved the original database schema to the point that the version I'm running could still operate if I switch to node utstats 2 for importing your updated logs? Alternatively, have you only appended additional information to the logs so I could just adjust the php import script to ignore the additional info for the older version? What I mean is, do you know if there is a way I could run both without having redundant data as in double the logs or two databases?

            Thanks for the offer to add additional features for combogib. I'm planning to make a new table in UTStats to display combogib specific achievements but before doing that I've been planning some changes to the combo reward messages on the game server. Once I have those changes nailed down then the table could be designed properly and it would be better for you at that point in deciding what combogib features (events & leaderboards etc) you might want to add.

            There is a mode that can just use original utstats databases, but I haven't checked it in months so it's unlikely to work(code is probably a mess compared to the newer stuff anyway). There are settings that can import the logs and leave them in the servers Logs folder, then have another setting enabled that will prevent them from being imported multiple times.

            In theory you could have node utstats 2 check every 1 minute for new logs, and import them, then use what process you are using now to import them currently, or just copy the files from the node utstats imported folder to the utstats import folder.

            Regarding the leaderboards , I don't know if the mutator for the combo announcements logs data already to logs, because I know sp0ngeb0b added the events to his custom utstats.

              Thanks for answering my questions. Have you kept the same sql tables used in the original utstats and just added extra fields and/or tables:

              Or did you create a whole new database structure? If you are using the original and have only added to it rather than removed anything then the old site should be able to, in theory, just query your database for its information to display. In that case, I could have node utstats 2 take over all the logging and importing.

              Ooper Regarding the leaderboards , I don't know if the mutator for the combo announcements logs data already to logs, because I know sp0ngeb0b added the events to his custom utstats.

              I'm using a standalone re-implementation with some borrowed code from sp0ngeb0b's combo announcements. His combo announcements were embedded in his custom SmartCTF. Credit to sp0nge for the great idea by the way. So, I will need to set this other version up to do logging once I have made the changes to it to add additional rewards/sounds.