PDA

View Full Version : Stats - Lag ?



o_O
12th October 2013, 01:39
It seems like the Stats Site is working sometimes, and sometimes not.
Ive tested it on my Server including People that Game and some orther Servers..
I did like 7 Rounds tried to refresh it after 2 hours and it doesnt seems to add points..

iammitch
12th October 2013, 02:38
Under normal circumstances, the time between the server sending the log to a collector and the data being added to stats should be around 2 minutes (Since the Collector, Parser, and Scoring System all have a 30s sleep if there's no new logs to process (Which is what normally happens)).
It seems that some of the programs are still getting deadlocks which cause them to crash (Which I thought I fixed a while ago). I've given them a restart, and I'll look into why this issue is still occurring.

o_O
12th October 2013, 18:26
Well apparently it looks like i got my Points after 10 - 14 Hours.


Under normal circumstances, the time between the server sending the log to a collector and the data being added to stats should be around 2 minutes

Im really curious about that. Well never heard about Deadlocks, what does it mean exactly?

iammitch
12th October 2013, 23:13
Before I explain what a deadlock is, I should say that the Stats program is made up of a few programs:


Listener - A simple listen program that accepts logs from valid servers and stores them in the database.
Collector - This program simply takes logs from the other 2 listeners, and puts their logs into the master log database.
Parser - This program takes the raw logs and generates meaningful data from them (Kills, Session Lengths, Damage Dealt...).
Processor - This program takes the processed kills/sessions/damage, and stores that data into various tables that the stats site and stats plugin uses.

The idea behind having multiple programs is that it's designed to prevent a single problem in one section from bringing down the rest of the programs (Ie: You don't want the listener to crash and burn due to an error in the parser).

A deadlock is caused when 2 or more of these programs try to read/write to the same table (This is usually when the parser and processor try to read/write to the same table); and if a deadlock is raised by the Database, the program gets an exception thrown at it.

The program is meant to pick this up and simply reset the program back to the last commit that was successful, but one of the functions wasn't throwing the deadlock exception properly, and was simply terminating the program (Which has the effect of ensuring that any changes aren't saved).

o_O
13th October 2013, 04:10
Okay apparently it doesnt work again..

9 Hours after it doesnt add Points..ill look tomorrow if it does.