Callback Read timed out
Posted: Wed Apr 22, 2020 4:43 pm
This is not a bug report, I'm 99.99% sure this is something in my code or simply too much code ... but I have a question about the callback.php file since my code works fine 90% of the time and then once or twice a day we get this ...
I've isolated this down to when it started in mid-March, and what this causes is for the code in one of the callback.php "cases" to run twice and thereby duplicate what we have the code doing.
There is quite a bit going on in our case "TourneyFinish": area, so I'm wondering if perhaps I've overdone it. Is there some sort of time limit on the callback where things need to finish by a certain amount of seconds?
I can post the code I have in this area if necessary, but it's pretty much the code I've pasted on the forum previously that reads the tourney results file, then it calculates points based off place finished, loops through entrants and puts the points into the Level field for the players, then adds +1 to the # of tourney's played in and stores that in the ERake field, then sends a message with a discord bot, then if it was a KO tourney returns the entry fee back to the winner of the tourney.
So like I said, there's a bunch going on in that one case and since it works fine 90% of the time I'm just wondering if at times it simply takes too long to process all of this due to the number of players in the tournament??? Because I see nothing wrong with the code (but I'm a n00b).
And if that could be the case, is there anyway around it?
I've isolated this down to when it started in mid-March, and what this causes is for the code in one of the callback.php "cases" to run twice and thereby duplicate what we have the code doing.
There is quite a bit going on in our case "TourneyFinish": area, so I'm wondering if perhaps I've overdone it. Is there some sort of time limit on the callback where things need to finish by a certain amount of seconds?
I can post the code I have in this area if necessary, but it's pretty much the code I've pasted on the forum previously that reads the tourney results file, then it calculates points based off place finished, loops through entrants and puts the points into the Level field for the players, then adds +1 to the # of tourney's played in and stores that in the ERake field, then sends a message with a discord bot, then if it was a KO tourney returns the entry fee back to the winner of the tourney.
So like I said, there's a bunch going on in that one case and since it works fine 90% of the time I'm just wondering if at times it simply takes too long to process all of this due to the number of players in the tournament??? Because I see nothing wrong with the code (but I'm a n00b).
And if that could be the case, is there anyway around it?