Your (alka's) threaded query handler is useless, since it doesn't provide any information about the query whatsoever.
Code:
public query(FailState, Handle:Query, Error[], Errcode){
}
You might want to check whether the query even executes:
Code:
public query(FailState, Handle:Query, Error[], Errcode){
log_amx( "Query %d executed. Data: { FailState: %d, Errcode: %d, Error: %s }", _:Query, FailState, Errcode, Error )
}
Run the plugin for several hours and then check your logs. Post the results here.