activerecord-session_store icon indicating copy to clipboard operation
activerecord-session_store copied to clipboard

Duplicated session_id

Open tnguyenblurb opened this issue 7 years ago • 2 comments

AFAIK, session_id should be unique so i did set unique for session_id but got the issue below. Could anyone here help me to explain why session_id is duplicated, is it related to concurrency and how to avoid this? Status: 500 Internal Server Error PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "unique_session_id" DETAIL: Key (session_id)=(addfsd48af9691df9ebb42863cac4234) already exists. : INSERT INTO "sessions" ("session_id", "data", "updated_at", "user_id", "created_at") VALUES('addfsd48af9691df9ebb42863cac4234', 'secret data', '2017-06-19 16:07:58.759697', NULL, '2017-06-19 16:07:58.759697') RETURNING "id"

tnguyenblurb avatar Jun 20 '17 08:06 tnguyenblurb

+1

gfarias avatar Dec 06 '17 00:12 gfarias

+1

tnguyenblurb avatar Feb 02 '18 03:02 tnguyenblurb