[英]Is there a limit in Rails for maximum number of sessions?
I am using Rails 4.2.7.1, and MySQL to store the sessions. 我正在使用Rails 4.2.7.1和MySQL来存储会话。
One of my colleagues told me that there is a limitation on the maximum number of sessions that can be supported by Rails, but I couldn't find a reference to this subject. 我的一位同事告诉我,Rails可以支持的最大会话数是有限制的,但是我找不到这个主题的参考。
Is there a maximum number of sessions supported by Rails? Rails是否支持最大会话数?
If you are using MySQL as a session store, all your session data exists in serialized form in the database: 如果将MySQL用作会话存储,则所有会话数据都以序列化形式存在于数据库中:
mysql> desc sessions;
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+----------------+
| id | int(11) | | PRI | NULL | auto_increment |
| session_id | varchar(255) | YES | MUL | NULL | |
| data | text | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
+------------+--------------+------+-----+---------+----------------+
4 rows in set (0.02 sec)
The maximum number of sessions, not the individual session size, is actually limited by the number of rows per table in the MySQL database -- which is quite huge -- or by your disk space but not by Rails itself. 实际上,最大会话数(而不是单个会话大小)实际上受MySQL数据库中每个表的行数(这非常大)或磁盘空间的限制,而不是受Rails本身的限制。
See " Maximum number of records in a MySQL database table " for more information. 有关更多信息,请参见“ MySQL数据库表中的最大记录数 ”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.