(858) 586 7777 | About | Testimonials | Contact
vteams vteams vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
Blog
  1. vteams
  2. Blog
  3. Never store sessions in DB
Jan 22
Never-store-sessions-in-DB

Never store sessions in DB

  • January 22, 2020

In vteams “____” I had an issue of production servers crashing after every 15 mins.

Problem :

We have testing and other instances available to reproduce the same issue but we were never able to reproduce that issue on testing servers. Then to debug that issue we went one step ahead and enable all sorts of logging in our project identified a few API that may cause crash as we were also not having proper error why the server is crashing. After lots of efforts and no luck we thought there must be something wrong with our server so we also tried changing server for avoiding that issue and it didn’t helped as well.

Then we saw RDS and we were having low memory on production database that was the cause of server crashing and we updated that and this fix avoided or suppressed the issue for a couple of months but the issue was still there.

One day I was testing why the memory is consumed so much even after updating RDS mysql instance and I saw that there was a table session which was haing millions of records but no indexing both things were of concern for us.

Solution :

So I start debugging the sessions plugin and what we saw surprised us and we were having a session created in database for each http call even the issue is successfully logged in and that module is running a query to delete all unused sessions created 10 years ago to delete and that query is running, and table has no indexing and database is going busy and that query is scheduled to run every 15 minutes when I saw the plugins code this was getting our server crashed after waiting for database connection establishment timeout. We shifted to jwt tokens as we don’t need sessions,  removed the sessions storage plugin cleared that table and the issue is fixed.

  • Facebook
  • Twitter
  • Tumblr
  • Pinterest
  • Google+
  • LinkedIn
  • E-Mail

Comments are closed.

SEARCH BLOG

Categories

  • Blog (490)
  • Captain's Log (1)
  • Closure Reports (45)
  • Experiments (7)
  • How-To (56)
  • Implementation Notes (148)
  • Learn More (156)
  • LMS (8)
  • Look Inside (10)
  • Operations Log (12)
  • Programmer Notes (20)
  • R&D (14)
  • Rescue Log (4)
  • Testimonials (25)
  • Uncategorized (4)

RECENT STORIES

  • GitHub Actions- Automate your software workflows with excellence
  • Yii Framework – Accomplish Repetitive & Iterative Projects with Ease
  • A Recipe for CRM Software Development
  • Are Agile and DevOps the same?
  • The Data Scientist’s Toolset

ARCHIVES

In Short

With the vteams model, you bypass the middleman and hire your own offshore engineers - they work exclusively for you. You pay a reasonable monthly wage and get the job done without hassles, re-negotiations, feature counts or budget overruns.

Goals for 2020

  • Open development center in Australia
  • Complete and Launch the Robot
  • Structural changes to better address Clients' needs

Contact Us

Address: NEXTWERK INC.
6790 Embarcadero Ln, Ste 100,
Carlsbad, CA 92011, USA

Tel: (858) 586 7777
Email: fahad@nextwerk.com
Web: www.vteams.com

© 2020 vteams. All Rights Reserved.

Content Protection by DMCA.com