Page 1 of 1

Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Wed Sep 27, 2017 8:54 pm
by kestas
My opinion it is bad!

Working together with author of this module https://www.opencart.com/index.php?rout ... n_id=17618 we find out the problem appear in the new release OC3.x.x that sessions data was moved to the database. DB table where sessions are stored has no space to fit all session's data (both lists of terminals and pakomats!) when omniva & lpexpress both enabled. In previous versions of the OC session's data was stored to the file.
there is some ways to solve this issue
1. switch sessions to file engine in system/config/catalog.php
2. change type of column of table where session data stored
or maybe authors of the OC 3.0 can suggest better way?

Thank you in advance...

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Thu Sep 28, 2017 3:42 am
by kestas
anybody knows why sessions data was moved to db where not enough space for this data?

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Thu Sep 28, 2017 10:24 am
by straightlight
Moving the session string into the database does has its good but also has its bad. Access to the database is required in order to initiate a more secured session for the users. Although, even though this tactic may have been used for security purposes, it may not only slow down performance a bit but also limiting the capacity size whenever new session strings are being generated even though when the expiry time period has exceeded for each rows since either more users or search engine bots may visit the site frequently and the session table may not be able to handle as many data in order to maintain the site's performance.

Switching back to file mode may greatly help the store's performance. Although, it is a less secured strategy when users visits the store.

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Thu Sep 28, 2017 11:30 am
by phinq1910
I think it is better (can't be hijacked)

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Thu Sep 28, 2017 4:15 pm
by kestas
phinq1910 wrote:
Thu Sep 28, 2017 11:30 am
I think it is better (can't be hijacked)
Ok, but how increase capacity for the session data and performance?

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Thu Sep 28, 2017 7:03 pm
by straightlight
By upgrading server capacity plans.

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Fri Sep 29, 2017 3:31 am
by kestas
...I find out simplest solution. I have changed session's data column type from text to longtext. Thats all, now working fine. Enough space for session data...
So maybe it is good to move session's data to DB. :) Only need to do some steps to get it working properly.

Thank's all for help and Good Luck

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Fri Sep 29, 2017 3:34 am
by straightlight
Extending the field size is only a temporary solution, however.

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Fri Sep 29, 2017 4:04 am
by kestas
straightlight wrote:
Fri Sep 29, 2017 3:34 am
Extending the field size is only a temporary solution, however.
If is true what you told, it is not good for beginners who starting with now money and use cheap servers for that.. they simply goes away from OC... and not only beginners, all will think about it if OC stops to work without understandable reason... I hope developers of the OC find some better solution for example maybe to have two possibilities to use DB or files for sessions data... And will keep users... :)

Cheers

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Fri Sep 29, 2017 4:18 am
by straightlight
If is true what you told, it is not good for beginners who starting with now money and use cheap servers for that.. they simply goes away from OC... and not only beginners, all will think about it if OC stops to work without understandable reason... I hope developers of the OC find some better solution for example maybe to have two possibilities to use DB or files for sessions data... And will keep users...
One of the advantage for all this is especially the fact that Opencart is free! :)

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Wed Dec 19, 2018 6:57 pm
by al404
Just found this topic since we developed a new e-commerce with OC3 and journal, already user for other projects
After activating a social camping the website got slower and slower and could not understand why, cache are enabled and is the same configuration that we had on other project

Just found oc_session with 24k records, running an optimized on DB tables got back speed to the website

Where is set lifetime of oc_session session? How can I increase performance?

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Wed Dec 19, 2018 8:49 pm
by ADD Creative

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Fri Dec 28, 2018 8:01 pm
by nongetjie
al404 wrote:
Wed Dec 19, 2018 6:57 pm
Just found this topic since we developed a new e-commerce with OC3 and journal, already user for other projects
After activating a social camping the website got slower and slower and could not understand why, cache are enabled and is the same configuration that we had on other project

Just found oc_session with 24k records, running an optimized on DB tables got back speed to the website

Where is set lifetime of oc_session session? How can I increase performance?
I'm experiencing the exact same problems. Did you manage to solve this?

Re: Session's data OC3.x.x moved to the DB.. It is good or bad?

Posted: Mon Feb 18, 2019 8:32 pm
by al404
the only way I found is to run an optimize on tables every once in a while :(