Post by opensource » Thu Sep 29, 2022 4:37 am

Good day,

Version: 3.0.2.0

I have a lot of sessions in a table oc_session with column data = false. Can I just safely delete them? I believe these are useless and might be generated by some broken module. I have no other ideas.

('f49d848ff5b728e493954723d6', 'false', '2022-09-28 05:35:43'),
('f49d907600e81c66d630b6ab40', 'false', '2022-09-27 15:39:35'),
('f49d9aa8cc8834069a756c7aa2', 'false', '2022-09-28 05:56:25'),
('f49dbc467630834ff9b95f8e6e', 'false', '2022-09-24 23:22:24'),
('f49dca47e4977895ffca5e4020', 'false', '2022-09-23 00:31:52'),
('f49dcf75501f2b681094d7c637', 'false', '2022-09-24 08:16:42'),
('f49dd629b779a3afc301ad4aed', 'false', '2022-09-24 18:16:10'),
('f49dd95eb73ff515a3186deea5', 'false', '2022-09-26 18:09:21'),
('f49e062b9098e1b2e09a582ee6', 'false', '2022-09-26 16:45:51'),

Newbie

Posts

Joined
Wed Dec 23, 2020 5:44 am
Location - Lithuania

Post by paulfeakins » Thu Sep 29, 2022 7:58 pm

There's a fix in later versions of OC, you can backport it if you know what you're doing.

If not, contact us and we can do it: info@antropy.co.uk

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by jrr » Sat Nov 12, 2022 4:14 am

paulfeakins wrote:
Thu Sep 29, 2022 7:58 pm
There's a fix in later versions of OC, you can backport it if you know what you're doing.

If not, contact us and we can do it: info@antropy.co.uk
I have 3.0.3.6 and have similar problems with oc_sessions. My repeating sessions are for apparently two extensions:
"{"language":"en-gb","currency":"CAD","eautoupdatess":true}"
and
"{"language":"en-gb","currency":"USD","abandonedCart_ID":"some random code here"}"

I'm getting four a minute or so...

Image

Not sure if this is the problem you are referring to Paul, or it is the extensions named...these extensions both have crontab calls, but the calls are just once a day.
I'm going to turn them both off and see what happens. Several extensions turned off but I'm still getting 4 calls a minutes - looks like it is Currency related...

Image


Can you provide a link to the github page about this issue you mention?

I believe this is the Sessions Not Expiring problem, after digging a bit further...

Thanks!
Last edited by jrr on Sat Nov 19, 2022 11:54 pm, edited 1 time in total.

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by straightlight » Sat Nov 12, 2022 7:43 am

jrr wrote:
Sat Nov 12, 2022 4:14 am
paulfeakins wrote:
Thu Sep 29, 2022 7:58 pm
There's a fix in later versions of OC, you can backport it if you know what you're doing.

If not, contact us and we can do it: info@antropy.co.uk
I have 3.0.3.6 and have similar problems with oc_sessions. My repeating sessions are for apparently two extensions:
"{"language":"en-gb","currency":"CAD","eautoupdatess":true}"
and
"{"language":"en-gb","currency":"USD","abandonedCart_ID":"some random code here"}"

I'm getting four a minute or so...

Image

Not sure if this is the problem you are referring to Paul, or it is the extensions named...these extensions both have crontab calls, but the calls are just once a day.
I'm going to turn them both off and see what happens. Several extensions turned off but I'm still getting 4 calls a minutes - looks like it is Currency related...

Image


Can you provide a link to the github page about this issue you mention?

I believe this is the Sessions Not Expiring problem, after digging a bit further...

Thanks!
I believe it's been fixed in the opencart-3 repository: https://www.github.com/opencart/opencart-3 .

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by jrr » Sat Nov 12, 2022 9:55 am

straightlight wrote:
Sat Nov 12, 2022 7:43 am
jrr wrote:
Sat Nov 12, 2022 4:14 am
paulfeakins wrote:
Thu Sep 29, 2022 7:58 pm
There's a fix in later versions of OC, you can backport it if you know what you're doing.

If not, contact us and we can do it: info@antropy.co.uk
...

I believe this is the Sessions Not Expiring problem, after digging a bit further...

Thanks!
I believe it's been fixed in the opencart-3 repository: https://www.github.com/opencart/opencart-3 .
Looks like Paul suggested fixing php.ini to help deal with this back in '17:

https://www.antropy.co.uk/blog/opencart ... illing-up/

Would adding the three variable he speaks of clear up both this and other issues with tmp files? I checked, and I already had it set to an hour:

Image

Well it was worth a look!
Last edited by jrr on Sat Nov 19, 2022 11:56 pm, edited 1 time in total.

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by JNeuhoff » Sat Nov 12, 2022 6:22 pm

If this still hasn't been fixed with above suggestions, your website might be subjected to a bruteforce attack. Check your server's raw access log.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by ADD Creative » Sat Nov 12, 2022 6:28 pm

Changing the setting won't help unless you apply the bug fixes.

Probably the easiest thing to do id to just to use the latest file from the 3.0.x.x Maintenance branch.
https://github.com/opencart/opencart/bl ... ion/db.php

Have you looked in your web access logs to see if you can spot the requests that cause your issue?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by by mona » Mon Nov 14, 2022 10:40 am

no problem there, a bot will create a new session on every request, they do not hold the session.
So, if googlebot or any other bot requests your pages, you will be creating many sessions, nothing wrong with that.

The language":"en-gb","currency":"USD","abandonedCart_ID"... are just session variables and their value.

It only becomes a problem when those session entries are not removed after they expire.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by JNeuhoff » Mon Nov 14, 2022 6:07 pm

The OP (opensource) hasn't responded since Sep 28, 2022. Hence we can assume that he's by now resolved this issue.

For others, I suggest to open a new forum thread when facing similar issues with an inflated oc_session DB table.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by jrr » Thu Nov 17, 2022 3:58 pm

JNeuhoff wrote:
Mon Nov 14, 2022 6:07 pm
The OP (opensource) hasn't responded since Sep 28, 2022. Hence we can assume that he's by now resolved this issue.

For others, I suggest to open a new forum thread when facing similar issues with an inflated oc_session DB table.
[
SOLVED]
Just to close my problems with excessive oc_sessions in the DB.

It was all my fault.

I had set up the /storage directory with the wrong permissions - I used 700 instead of 755 - I was trying to hide the directory from the public.

The fix was simple:
  • leave an admin window open set to admin/extensions/modifications
  • then reset (just) the /storage directory permissions to 755
  • delete the /storage/modification directory
  • create an EMPTY /storage/modification directory,
  • then go to admin/extensions/modifications and do a refresh - note that when you refresh the storage/modification directory is rebuilt

oc-sessions are now being deleted as they should be once expired.

I'm using .htaccess to prevent access to my /storage directory (folks see a 403 error) and .htaccess & .htpasswd protection for my /admin directory. I've gone back to the /admin name because it seems to annoy some extensions to change the admin directory name.

John :-#)#
Last edited by jrr on Sat Nov 19, 2022 11:56 pm, edited 1 time in total.

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by paulfeakins » Thu Nov 17, 2022 7:10 pm

jrr wrote:
Thu Nov 17, 2022 3:58 pm
[
SOLVED]
Please put the [SOLVED] at the start of the post TITLE not of your post.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by jrr » Sat Nov 19, 2022 11:55 pm

paulfeakins wrote:
Thu Nov 17, 2022 7:10 pm
jrr wrote:
Thu Nov 17, 2022 3:58 pm
[
SOLVED]
Please put the [SOLVED] at the start of the post TITLE not of your post.
I did not start the thread, all I can do is add [Solved] to my post's subject lines...

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by paulfeakins » Sun Nov 20, 2022 3:08 am

jrr wrote:
Sat Nov 19, 2022 11:55 pm
paulfeakins wrote:
Thu Nov 17, 2022 7:10 pm
jrr wrote:
Thu Nov 17, 2022 3:58 pm
[
SOLVED]
Please put the [SOLVED] at the start of the post TITLE not of your post.
I did not start the thread, all I can do is add [Solved] to my post's subject lines...
Ah yes, no worries!

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom
Who is online

Users browsing this forum: No registered users and 17 guests