Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 03-20-2018 15:02:19

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Being logged out, needing to refresh on first visit??

Hi Nick

Have you got any known login/session issues with the latest version of V9??

The following happens frontend and backend, and in all browsers.

Minutes of Inactivity Before User Logout is set to 240 for both frontend and backend.

I am logged into backend, and leave PC for around 30mins. When I return and click any link in the backend, nothing happens. Eventually I get a timed out error.
If I click any link twice, I am immediately directed to the login page and I have to login again.

Frontend, and it doesn't matter if I am logged in or not, if I return to pc after around 30mins and click any link, nothing happens. Again, if I click the link again everything works perfectly.

I cannot force the error by deleting cookies or cache, and it only ever happens if the site is open and left for a while.

I have checked with host to make sure ssl and domain are set up correctly.

Any ideas


Rob

Offline

 

#2 03-22-2018 07:42:37

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Being logged out, needing to refresh on first visit??

No idea on this one.  Assuming you're using 9.0.2, as you said so.  Nobody else has reported this issue.  Makes me think maybe you have a cookie domain or path set incorrectly (but mostly correctly) in your private config.php file.  When you leave and come back 30 minutes later, the system is going to try to rotate your user token (it does this every 15 minutes).  That's about the only difference between accessing a page after 1 second vs. 30 minutes.  Do your webserver error logs hold any clues?


Nick Hendler

Offline

 

#3 03-22-2018 13:58:52

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Being logged out, needing to refresh on first visit??

what is the correct config set up??

$config['core.url'] = 'https://www.mydomain.co.uk';
$config['core.cookie_domain'] = '.mydomain.co.uk';
$config['core.cookie_path'] = '';


Rob

Offline

 

#4 03-23-2018 07:11:04

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Being logged out, needing to refresh on first visit??

That looks right.  Either '' or '/' works fine for the path.  The domain is right as per the URL.  Do your webserver error logs hold any clues?


Nick Hendler

Offline

 

#5 03-23-2018 11:46:51

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Being logged out, needing to refresh on first visit??

wouldn't really know what to look for, but I have multi instances of the following.

85.25.210.234 - - [23/Mar/2018:10:08:53 +0100] "GET /robots.txt HTTP/1.1" 301 - wwwmydomain.co.uk "-" "Mozilla/5.0 (compatible; adscanner/)" "-"

85.25.210.41 - - [23/Mar/2018:10:11:45 +0100] "GET /robots.txt HTTP/1.1" 404 23394 wwwmydomain.co.uk "-" "Mozilla/5.0 (compatible; adscanner/)" "-"

Are these errors?


Rob

Offline

 

#6 03-26-2018 09:18:20

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Being logged out, needing to refresh on first visit??

You're missing a robots.txt file in your web root according to those entries, but that's not what we're looking for.  Looking for 500 internal server errors or anything like that in your error log.


Nick Hendler

Offline

 

#7 03-27-2018 03:25:54

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Being logged out, needing to refresh on first visit??

No server errors at all.
When this happens, there is absolutely nothing logged in the error logs as it may eventually load.

In firefox developer console I get something like this:

POST   https://www.mydomain.co.uk/admin.php  [HTTP/2.0 200 OK 99634ms]

The 99634ms is the problem. Second, and every further click is 1000ms or less.

Console also shows this warning:
A form was submitted in the windows-1252 encoding which cannot encode all Unicode characters, so user input may get corrupted. To avoid this problem, the page should be changed so that the form is submitted in the UTF-8 encoding either by changing the encoding of the page itself to UTF-8 or by specifying accept-charset=utf-8 on the form element.

I have checked on other K9 sites and they don't have this error - see EDIT, and I have checked on my live K9.0.1 site and it doesn't have this error, but not sure if it is related.
Both my test(K9.0.2) and live(K9.0.1) are hosted on same server with same php version(7.1).

EDIT - Other recently launched k9 sites also have the console warning about the encoding, but not sure if this is important or not.

The only difference I can see in server setting is the live site has a Geotrust True Business ID with EV SSL whereas the test site has a very basic SSL.

It may be that I have the site open in various browser for testing, or it may be the budget SSL.

I will keep testing anyway, but let me know if you can think of anything.

Last edited by zanart (03-27-2018 03:30:36)


Rob

Offline

 

#8 03-27-2018 09:36:22

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Being logged out, needing to refresh on first visit??

I have a theory here, and I'm pretty sure this will solve your issue.  Check your setting for 'Software Automated Cron Status' under System / Component / Settings / Cron Settings.  I bet it's set to true, meaning that all cron tasks are run when a browser accesses a page generated by the software at a specific time.  Your site is in dev, I think, meaning you're likely the only one accessing the site and when you leave it for 30 minutes, when you come back you are triggering (at least) 30 minutes worth of cron jobs.  If your site is large and you generate sitemaps or connect to Amazon or eBay (basically you have cron jobs that run a bit longer), you're going to want to set up automated cron, which means using your server's cron functions to run cron.

To do this, you need to set up a job that runs every 5 minutes, every hour, every day that executes:

Code:

/usr/bin/wget -O - -q https://yourdomain.com/utilities/runcron.php

I think this will clear your issue up.  In your case your server is failing to run the cron in the time your browser needs to pull management interface window content in via ajax.  It will cause delays on intermittent customer page loads once you go live.


Nick Hendler

Offline

 

#9 03-27-2018 09:55:00

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Being logged out, needing to refresh on first visit??

I have turned off automated cron's and will check if the problem goes away.
If it does I will do as you suggest.

Last edited by zanart (03-27-2018 14:28:23)


Rob

Offline

 

#10 03-28-2018 07:50:18

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Being logged out, needing to refresh on first visit??

OK.  In the interim a lot of things are not going to get done, so I'd suggest keeping cron downtime to a minimum.


Nick Hendler

Offline

 

#11 03-28-2018 10:15:12

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Being logged out, needing to refresh on first visit??

Theory worked!
Seems obvious now!


Rob

Offline

 

#12 03-28-2018 15:01:25

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Being logged out, needing to refresh on first visit??

Yeah, sorry it took so long to figure out that might be what it was.  We were both thinking along the lines of a session issue due to your time logged in.


Nick Hendler

Offline

 

Board footer