Time server issues

  • 10 Replies
  • 2879 Views
*

Offline StagBullSwitch

  • ***
  • 125
  • Gender: Male
    • View Profile
Time server issues
« on: May 30, 2018, 02:34:41 PM »
I seem to get time server connection issues sometimes when I'm starting the app, like I'm not connected to the Internet.
I can browse just fine immediately after it happens, or use any other app that connects to the Internet, but Chastikey complains about it.
I wouldn't say it happens frequently, but it's a little more often than I would call "occasional."
This last time I restarted my phone and it's working fine after that, so it might be the phone, but I've also seen cases where it would fail to connect, and go into offline mode, then when it tries to reconnect in 90 seconds it works then, too.

It's weird, and not particularly detrimental, but I'm wondering if anybody else has seen anything like this?

How exactly do you get the time?  Have you got a time script on your server, or does it query an NTP pool server?

Stag

*

Offline StagBullSwitch

  • ***
  • 125
  • Gender: Male
    • View Profile
Re: Time server issues
« Reply #1 on: May 30, 2018, 02:53:01 PM »
Ok, now it just went into offline mode as it was creating a lock.  I loaded a shared lock from quietlyDevious, and it seemed to take forever on the "Creating lock" text popup after the random numbers screen.  When it finally completed it had the red banner at the bottom saying it was in offline mode.
It's back online now, but does that mean the lock was never saved to the database on the server?  Or does it save it as soon as it comes back online again?

Stag

*

Offline KevinCross

  • *****
  • 1577
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: Time server issues
« Reply #2 on: May 30, 2018, 03:10:01 PM »
It reads the time from a PHP script on my server. I did look at an NTP server in the early days of developing ChastiKey but couldn't find anything in their terms to say that I'd be able to use them and not be blocked at a later date (I last looked at this sometime in 2016).

I could switch it to an NTP type server that's built specifically for requesting time but then I'd still need to make a call to my server to make sure that the locks data will be sent back and forth etc. I say my server but I'm using a shared hosting server (currently with GoDaddy). ChastiKey doesn't use a dedicated server yet. I don't get enough from it to warrant those costs.

I haven't got around to switching to one of my other shared hosting providers yet as I've been really busy with the re-write. And I can't promise making the move will improve things, apart from getting SSL.

I'm hoping though that in the new version of ChastiKey you should see a lot of speed improvements. I've starting developing a way to do a lot of web calls in the background so you shouldn't see too many alerts like "Updating database". It does still need to make that initial call at the beginning to get the server time and if it doesn't get the response within a certain amount of time it goes into offline mode so that you can still access your locks (which is what it does in the current version). I don't really know of a better way of doing that. I'm happy for suggestions though.

In answer to your second question. When the app starts it updates the database with the locks on your device. This is done in the splash screen process. It also adds to the database when you pick a card if it's a variable lock. I can double check your lock in the database later on when I'm home. If quietlyDevious can see you in their list of users then that would mean the lock has saved in the database.

In the next version I'm going to have something visual on the lock screen or on each lock which shows when the database is updating with the lock(s). Like the syncing symbol you see with Dropbox. You should then have a better idea if the lock has actually saved in the database or not. If I can get it syncing both ways then it should mean you'd be able to have your account on multiple devices which some of you want.

It's too early to say when the next version will be available as I've still got a lot to do. I'm basically re-creating each screen one by one. I'm about half way through the locks screen, so still a way to go.
« Last Edit: May 30, 2018, 03:11:50 PM by KevinCross »
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.

*

Offline StagBullSwitch

  • ***
  • 125
  • Gender: Male
    • View Profile
Re: Time server issues
« Reply #3 on: May 30, 2018, 03:34:58 PM »
Well, I wouldn't expect you to have a dedicated server.  That's not exactly cheap for an app that might make you 20 quid a month.
I'm going to try switching off wifi and using mobile data before I start the app for a little while, and see if it works that way, or still fails sometimes.

I mostly use it on the same network that had the weird multiple lock problem due to my caching proxy, so maybe I've got something else odd that's causing issues, too.  I haven't paid enough attention to notice whether it's always on my home network when it fails, or if it happens other places, too.

I'll keep you posted if I discover anything else.

Stag

*

Offline KevinCross

  • *****
  • 1577
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: Time server issues
« Reply #4 on: May 30, 2018, 04:17:05 PM »
Thanks. And yeah I often jump off the home wifi when I'm having issues and jump on the mobile network which sorts it.

I have a cronjob set up using cron-job.org that reads a small file on the server every couple of minutes and emails me if it failed several times in a row. This check has been up and running for a couple of months now and I've not yet been emailed to say that there's been connection issues.
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.

*

Offline StagBullSwitch

  • ***
  • 125
  • Gender: Male
    • View Profile
Re: Time server issues
« Reply #5 on: May 30, 2018, 05:03:27 PM »
Hmmm..interesting.  I've never seen cron-job.org before.  Probably going to have to use that for some of my own work at some point.  Even if only for a "is my site up?" kind of thing...

Stag

*

Offline KevinCross

  • *****
  • 1577
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: Time server issues
« Reply #6 on: May 30, 2018, 05:32:21 PM »
Yeah it works well and is free. It offered more options and allowed me to run scripts more frequently then I could with my hosting account. I use it to run the bots as well.
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.

*

Offline DVDigital58

  • *
  • 253
  • Gender: Male
  • IT analyst who finds tease and denial thrilling.
    • View Profile
Re: Time server issues
« Reply #7 on: May 30, 2018, 06:09:52 PM »
I've also seen the time connection error. Normally works fine after restarting the app. I occasionally have to toggle in and out of airplane mode to fix wifi or 4G connectivity.

I've previously mentioned the app crashing but I'm assuming things will improve after the planned rewrite.
I did get lucky once when it crashed creating a lock so didn't save it.

*

Offline StagBullSwitch

  • ***
  • 125
  • Gender: Male
    • View Profile
Re: Time server issues
« Reply #8 on: May 30, 2018, 06:19:41 PM »
I did get lucky once when it crashed creating a lock so didn't save it.

Do you mean it gave you the combination to set, you set it, and forgot it during the flashing numbers screen, then ChastiKey crashed and didn't save the combination?
I somehow fail to see how that qualifies as lucky....

Although, I'm not into permanent chastity as anything other than a hot fantasy, so maybe it would be fantastic for some people here....


Stag

*

Offline DVDigital58

  • *
  • 253
  • Gender: Male
  • IT analyst who finds tease and denial thrilling.
    • View Profile
Re: Time server issues
« Reply #9 on: May 30, 2018, 06:37:07 PM »
No the app crashed as I was entering the numbers into the keybox so luckily I didn't have it scrambled but I could of been unlucky.

Losing the combination doesn't mean permanent chastity. It just means a frustrating challenge awaits to crack the code. I had to do that once on my old keybox because I'd stupidly locked it between sessions and didn't keep the code.

Spent about 4 days cycling through 10000 combinations although I did have to break it down in to chunks to stop myself going crazy. It also took 2 run throughs because I went far to quick on the first pass.

My new box is more secure so it would probably take longer unless I got lucky.

*

Offline KevinCross

  • *****
  • 1577
  • Gender: Male
    • View Profile
    • ChastiKey.com
Re: Time server issues
« Reply #10 on: May 30, 2018, 06:56:53 PM »
There may be occasions where it doesn't save a lock when creating it because of server issues (I'm talking locks where you're locked, not locks you're creating for others) but theres plenty of times where the app will attempt to fix that. At the splash screen and when you pick a card. With fixed locks it's just the splash screen as there's no cards to pick.

If for whatever reason it's still failed to save to the database the lock still runs and the combination is also saved on the device (encrypted) so assuming you don't have a device problem you can still use the lock as normal and it will unlock as normal.

If it didn't save to the database and your device broke then I'm afraid your combination is lost.

That's not nice to hear I know but I'm sure most of you know what to expect using a service like this and the risks involved. Even if everything saved perfectly 100% of the time there's still other risks like the service being hacked or server issues that I don't have much control over.

For those that use 4 digit combination locks the risks are minimal as the combination can be found eventually. How long depends on how secure the lock is. For those of us that use 8 digit safe combinations then we already have a back up. The safe key.

I'm doing the best I can to reduce those risks. It's been running for a over a year now and so far no one has messaged with a completely lost lock and combination. I'm not counting shared locks in that as thats more of annoyance creating one and it not saving. No damage is done when that happens.
Developer of ChastiKey - The timed keyholder for your chastity device (Available on Google Play and App Store)

ChastiKey.com | Twitter | Facebook | Discord Chat | FetLife Fan Page*

Want to sign up for beta testing?: Android | iOS

*FetLife fan page is not managed by me.