activerecord-session_store
activerecord-session_store copied to clipboard
status of this gem
Is this gem still being maintained?
I am using activerecord-session_store (1.1.1) and devise (4.4.3) on rails 5.1.6 and ruby 2.5.0p0. I am getting lots of this message. This application was updated from rails 4.2.3 to 5.1.6
[2018-05-07 13:44:56 -0500] [anonymous] [127.0.0.1] (1.7ms) BEGIN
[2018-05-07 13:44:56 -0500] [anonymous] [127.0.0.1] SQL (1.7ms) UPDATE "sessions" SET "data" = $1, "updated_at" = $2 WHERE "sessions"."id" = $3 [["data", "BAh7B0kiGV90dXJib2xpbmtzX2xvY2F0aW9uBjoGRUZJIi9odHRwOi8vbG9j\nYWxob3N0OjMwMDAvYWNhZGVtaWMtZnJpZGF5LTIwMTgGOwBUSSIKZmxhc2gG\nOwBUewdJIgxkaXNjYXJkBjsAVFsASSIMZmxhc2hlcwY7AFR7BkkiCmFsZXJ0\nBjsARkkiAcE8aSBjbGFzcz0iZmEgZmEtdGh1bWJzLW8tdXAgZmEtMngiIGFy\naWEtaGlkZGVuPSJ0cnVlIj48L2k+Jm5ic3A7R3JhY2lhcyBwb3Igc3UgaW50\nZXJlcyBlbiBlbCBBY2FkZW1pYyBGcmlkYXkgcGVybyBlbCBldmVudG8geWEg\ndGVybWluw7MuIExvIGVzcGVyYW1vcyBlbiAyMDE5IGVuIGVsICI1dGggQW5u\ndWFsIEFjYWRlbWljIEZyaWRheS4iBjsAVA==\n"], ["updated_at", "2018-05-07 18:44:56.542393"], ["id", 34705]]
[2018-05-07 13:44:56 -0500] [anonymous] [127.0.0.1] (3.8ms) COMMIT
Warning! ActionDispatch::Session::ActiveRecordStore failed to save session. Content dropped.
When I am logging in, the session is sometimes lost and I need to re-enter my user and password (I am sure my user and password are correct) and sometimes it works fine.
When I already logged in, the message is still being logged but my application works fine.
Also, the sessions table is being flooded with repeated information, I think.
Can someone point me out in the right direction to solve this?
Yes, it is still maintained.
Can you please provide a sample application that reproduces the error?
How do I do that?
I just do an app with the minimal gems and config to reproduce this error or I need to provide a special script?
Just an application with the minimal gems available on github is fine.
When I am logging in, the session is sometimes lost and I need to re-enter my user and password (I am sure my user and password are correct) and sometimes it works fine.
the _session_id should be passed in the parameters, check to make sure
When I already logged in, the message is still being logged but my application works fine.
it looks like your data is very long. check the length of the field data
in the sessions table to make sure you can write data that is that long to it. Try running the UPDATE statement directly in SQL to make sure it is not your database
Also, the sessions table is being flooded with repeated information, I think.
that screenshot looks normal to me. you'll notice that every _session_id is unique
Hi,
I am seeing the same thing where although session id is unique it keeps flooding the sessions table for for any subsequent request after login, is this expected behaviour or may be something wrong in the way i have configured the gem?

is this expected behaviour or may be something wrong in the way i have configured the gem?
No it is supposed to pick up your session on each request. Examine the _session_id in your browser, then examine it on the Rails side and make sure it is being passed consistently and correctly.
this gem has worked fine for years so it is not a question of "being maintained"… what has happened is that the web has evolved into new paradigms and left Rails behind in many ways.
also debugging session problems is actually difficult
Can this issue be closed?