Calcudoku puzzle forum
http://www.calcudoku.org/forum/

Connection issues / timeouts
http://www.calcudoku.org/forum/viewtopic.php?f=18&t=950
Page 2 of 2

Author:  pnm  [ Sat Aug 19, 2017 4:41 pm ]
Post subject:  Re: Connection issues / timeouts

ddarthez wrote:
Whenever I solve a puzzle in the last few days, I get all kind of time-out errors. Subsequently, I have to wait for minutes, before I actually get to the page that I want to access.


I just added an efficiency improvement to the code that processes solved puzzles (both for the regular and the timed puzzles).

It should reduce "contention", so also reduce the time you need to wait before getting the "solved confirmation".

Please let me know if any such issues still show up, of course...

Patrick

Author:  ddarthez  [ Sun Aug 20, 2017 12:54 am ]
Post subject:  Re: Connection issues / timeouts

I am still getting time-out errors after submitting puzzles, after what I am guessing to be a minute or so. Also from looking down at the page with the puzzle, it does seem to take a minute or so before the "recently solved puzzles" tracker mentions my solution. This can also be confirmed in case of timed puzzles. If I finish a timed puzzle (and get the "submitting solution, please wait" screen), and open timed puzzles in another tab, it does show I have done one, but no time is mentioned on the "your best times today" panel.

But:
puzzle loading times are a lot better now. There is hardly a delay anymore - it takes 2 seconds now for a puzzle to load. So that is definitely good.

Also when i go to rankings now, I do get the results of Africa. This is exactly what the link suggests, so that seems to be working fine now as well.

Author:  pnm  [ Sun Aug 20, 2017 9:43 am ]
Post subject:  Re: Connection issues / timeouts

ddarthez wrote:
I am still getting time-out errors after submitting puzzles, after what I am guessing to be a minute or so. Also from looking down at the page with the puzzle, it does seem to take a minute or so before the "recently solved puzzles" tracker mentions my solution.

Yes, still seeing that for your account at this end too, will check some more..

Patrick

Author:  pnm  [ Sun Aug 20, 2017 11:32 am ]
Post subject:  Re: Connection issues / timeouts

Ok, I figured it out:

- when a solution is processed, the country you are in is determined from your IP address
- this is a database lookup, but if the address is not in the database, an online service (ip2location.com) is used to get the info (and store it)
- this is the case for your IP address
- the connection to ip2location.com times out [sneaky]
(it seems odd it's always timing out for this particular query (?))(or maybe for the time of day)

I added a check to see if the service is up before the query is done, this should speed things up.

The problem may still happen (let me know) if the ip2location server reports that it's up, but for some reason the IP lookup service times out.

If that happens, I'll add the IP entry manually, after that there'll be no more timeouts [drool]

Patrick

Author:  ddarthez  [ Sun Aug 20, 2017 1:00 pm ]
Post subject:  Re: Connection issues / timeouts

I tested it on three timed puzzles (the only puzzles I had remaining for the day). No time out errors!

That is really great, and thank you so much for your efforts. It is really appreciated.

Author:  pnm  [ Sun Aug 20, 2017 1:22 pm ]
Post subject:  Re: Connection issues / timeouts

ddarthez wrote:
I tested it on three timed puzzles (the only puzzles I had remaining for the day). No time out errors!

That is really great, and thank you so much for your efforts. It is really appreciated.


Thanks for testing [thumbup]

I now see in the logs that the ip2location service was (again) not available, but this was now quickly detected with a separate test
(so no 1 minute+ timeout there anymore)

edit: it looks like I should switch to one of these services:
http://about.ip2c.org
https://freegeoip.net
http://www.ip2nation.com

...

edit 2: switched to ip2c.org now and testing it

edit 3: confirmed to work [woot]

Author:  ddarthez  [ Mon Aug 21, 2017 7:29 am ]
Post subject:  Re: Connection issues / timeouts

It seems even quicker than it was yesterday after the original ip2location-fix.

All the puzzles were solved without even a hint of a problem with the site / submitting solutions.

Again, thank you so much for your efforts.

Author:  pnm  [ Mon Aug 21, 2017 7:45 am ]
Post subject:  Re: Connection issues / timeouts

ddarthez wrote:
It seems even quicker than it was yesterday after the original ip2location-fix.


You're probably right, because I now switched to ip2c.org, you no longer experience
the 1 second timeout of the test to see if the ip2location service is up..

Page 2 of 2 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/