View unanswered posts | View active topics It is currently Thu Mar 28, 2024 11:04 am



← Back to the Calcudoku puzzle page




Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
 Connection issues / timeouts 
Author Message
User avatar

Posted on: Sat Aug 19, 2017 4:41 pm




Posts: 3296
Joined: Thu May 12, 2011 11:58 pm
Post 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


Profile

Posted on: Sun Aug 20, 2017 12:54 am




Posts: 87
Joined: Fri Jan 13, 2017 2:51 pm
Post 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.


Profile
User avatar

Posted on: Sun Aug 20, 2017 9:43 am




Posts: 3296
Joined: Thu May 12, 2011 11:58 pm
Post 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


Profile
User avatar

Posted on: Sun Aug 20, 2017 11:32 am




Posts: 3296
Joined: Thu May 12, 2011 11:58 pm
Post 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


Profile

Posted on: Sun Aug 20, 2017 1:00 pm




Posts: 87
Joined: Fri Jan 13, 2017 2:51 pm
Post 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.


Profile
User avatar

Posted on: Sun Aug 20, 2017 1:22 pm




Posts: 3296
Joined: Thu May 12, 2011 11:58 pm
Post 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]


Profile

Posted on: Mon Aug 21, 2017 7:29 am




Posts: 87
Joined: Fri Jan 13, 2017 2:51 pm
Post 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.


Profile
User avatar

Posted on: Mon Aug 21, 2017 7:45 am




Posts: 3296
Joined: Thu May 12, 2011 11:58 pm
Post 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..


Profile
Display posts from previous:  Sort by  
Reply to topic   [ 18 posts ]  Go to page Previous  1, 2

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
All forum contents © Patrick Min, and by the post authors.

Forum software phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.