Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] QueryException when using database session driver #16569

Closed
amochohan opened this issue Nov 28, 2016 · 4 comments
Closed

[5.2] QueryException when using database session driver #16569

amochohan opened this issue Nov 28, 2016 · 4 comments

Comments

@amochohan
Copy link
Contributor

  • Laravel Version: 5.2.45
  • PHP Version: 7.0.8
  • Database Driver & Version: MySQL 5.7.12

Description:

When using the database session driver, I'm frequently getting QueryExceptions thrown because a duplicate session id is trying to be inserted. A simple check to see if the session id exists in the database, before inserting would fix this. Alternatively, a better way of the id being generated would remove the need for an extra query.

I've seen this issue in my logs a few hundred times over the past week so it seems to be significant.

Steps To Reproduce:

N/a

@GrahamCampbell
Copy link
Member

Session driver was refactored in 5.3. 5.2 isn't supported, sorry.

@amochohan
Copy link
Contributor Author

There's no real change in the code for DatabaseSessionHandler between 5.2 and 5.3. See the diff (only small docblock changes, and rather than using time(), the new code uses Carbon to get a timestamp.

In that case, this bug applies equally to 5.3 and should be reopened.

@themsaid
Copy link
Member

@drawmyattention We have this issue reported already: #9251

@amochohan
Copy link
Contributor Author

Thanks @themsaid I'll pick up from that thread. Eek, the bug's over a year old. I'll see if I can figure out the issue and submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants