You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently updated my site to Django 4.1/Mezzanine 6.0.0/Cartridge 1.3.4 and deployed it on a brand new server (it was cleaner to install a new OS - Ubuntu 22.04 - rather than upgrade the OS on my old server from 18.04).
I have a cronjob that runs a pg_dump on the database every four hours as a backup, and one thing I've noticed since this deploy is that there is a reasonable number of new 'cart_id' entries being added every few minutes.
Looking at the access logs there's a lot of bots (webcrawlers, mostly) hitting the site every few minutes, so my assumption is that whenever there's a new session (from a new "visitor" to the site) that a new cart_id is created. Does this seem like the probable scenario that's happening?
I've updated my robots.txt to try and prevent the bots accessing parts of the site that may be causing extra hits (/admin/, /accounts/login?...) so I'm hoping this will slow down eventually. I'm just wondering if there's perhaps somewhere in my code where I can clean/purge cart ids older than a certain timespan (e.g. 1-2 hours) as it's not likely anyone will need to keep their cart alive for that long.
Just wondering if anyone had any insight into this - it's not really a problem - just a curiosity.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I recently updated my site to Django 4.1/Mezzanine 6.0.0/Cartridge 1.3.4 and deployed it on a brand new server (it was cleaner to install a new OS - Ubuntu 22.04 - rather than upgrade the OS on my old server from 18.04).
I have a cronjob that runs a pg_dump on the database every four hours as a backup, and one thing I've noticed since this deploy is that there is a reasonable number of new 'cart_id' entries being added every few minutes.
Looking at the access logs there's a lot of bots (webcrawlers, mostly) hitting the site every few minutes, so my assumption is that whenever there's a new session (from a new "visitor" to the site) that a new cart_id is created. Does this seem like the probable scenario that's happening?
I've updated my robots.txt to try and prevent the bots accessing parts of the site that may be causing extra hits (/admin/, /accounts/login?...) so I'm hoping this will slow down eventually. I'm just wondering if there's perhaps somewhere in my code where I can clean/purge cart ids older than a certain timespan (e.g. 1-2 hours) as it's not likely anyone will need to keep their cart alive for that long.
Just wondering if anyone had any insight into this - it's not really a problem - just a curiosity.
Beta Was this translation helpful? Give feedback.
All reactions