Skip to content

Database sessions pile up #26308

Closed
Closed
@amenk

Description

@amenk

Preconditions (*)

Magento 2.2.x & 2.3.x & 2.4-develop

Steps to reproduce (*)

  1. Configure store to save session in DB(edit env.php)
    image
  2. Change Admin Session Lifetime to 60s for example
  3. Flush cache and logout
  4. Login again and check data in DB session table(note the last added data about your session)
  5. Wait 1 minute and click somewhere in admin
  6. Redirect to login page
  7. Login again
  8. Check data again

Expected result (*)

  1. Expired sessions were deleted.

Actual result (*)

  1. Tons of old entries in "sessions" table

Additional information

See also: https://magento.stackexchange.com/questions/300525/is-the-session-table-supposed-to-be-cleaned-up-automatically

Garbage collect is there, but seems to be never called:

shall we make a PR to add this to the core?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Framework/SessionIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.2.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions