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 09-24-2018 04:30:25

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1568
Website

CORE_Sessions table

Hi Nick

Quick query(1 of 2), we previously discussed/agreed it would be better for me to run a crontask via the server every 5 minutes that starts /utilities/runcron.php as I had a stock update cron job that takes around 30 seconds and may have delayed a user if they were the hit the site and run the half hourly crontasks.
This all works correctly as the crontasks are run in the background with automatic execution turned off.

I have noticed that the CORE_Sessions table contains around 20000 rows when I am the only person who visits it and search engines are blocked.
A row is created every 5 minutes when the cron task is run, and a row is created for every subsequent task that may need to be run.
Over a month, this creates around 20000 extra rows in the database.

Just want to check this is the expected behaviour and the extra rows are nothing to worry about.

Thanks
Rob


- Euorpacart 8

Online

 

#2 09-24-2018 07:34:53

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

Re: CORE_Sessions table

Interesting.  Can you tell me which version you're running?  I'm thinking it's 9.0.1 or lower.  Please advise.


Nick Hendler

Offline

 

#3 09-24-2018 07:37:14

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1568
Website

Re: CORE_Sessions table

9.0.2
It must be 9.0.2 as the sessions are KS based, not sid's

Last edited by zanart (09-24-2018 07:38:39)


- Euorpacart 8

Online

 

#4 09-24-2018 07:38:56

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

Re: CORE_Sessions table

Hmmm.  Can you post the core_sessions.data value for one of those rows created when cron runs?


Nick Hendler

Offline

 

#5 09-24-2018 07:42:25

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1568
Website

Re: CORE_Sessions table

Basically blank, other than my VAT display value which is set every new session

a:1:{s:10:"displayvat";s:4:"EXCL";}


- Euorpacart 8

Online

 

#6 09-24-2018 07:43:50

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1568
Website

Re: CORE_Sessions table

I haven't checked, but I assume the automatic cron execution  would also create a new session??

Edit: if I access /utilities/runcron.php, a new KS session row is created.

Last edited by zanart (09-24-2018 07:52:20)


- Euorpacart 8

Online

 

#7 09-24-2018 07:57:56

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1568
Website

Re: CORE_Sessions table

This has something to do with my displayvat value being generate every session!
It doesn't happen if I remove the start up task that creates it.

Self inflicted and nothing wrong with kryptronic!


- Euorpacart 8

Online

 

#8 09-24-2018 07:58:57

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

Re: CORE_Sessions table

You've added 'displayvat' as a session var for every user.  Guessing in another startup script.  That's why cron is creating a session.  Otherwise, it wouldn't save anything to a session (and in 9.0.2 and higher, no session would be created).  Maybe only set that session var for non-cron requests, or even better, do it for non-cron requests and set a cookie instead of using a session var.  In 9.0.2 we limited the use of the sessions table greatly, relying more on cookies to store things like your 'displayvat' variable.  Maybe you should only set 'displayvat' when set by a customer, otherwise default it.


Nick Hendler

Offline

 

#9 09-24-2018 08:02:49

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1568
Website

Re: CORE_Sessions table

You are correct. The mod was just duplicated from V8 without much thought going into it.
Think I will change to cookie based.

Thanks for the pointers.


- Euorpacart 8

Online

 

Board footer