phpretard Posted April 17, 2008 Share Posted April 17, 2008 Is there a limit to how mant session variables can be set? Any thoughts? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted April 17, 2008 Share Posted April 17, 2008 There was a similar question asked on a different forum, here are the answers: >2. Is there a practical limit on the number of simultaneous >sessions a simple server can handle? Would exceeding >this generate a "too many users" message or something? Again, you're limited by the session handler. If your OS has a limit on the number of files in a single directory, that's your answer. ------------------ > 2. Is there a practical limit on the number of simultaneous > sessions a simple server can handle? Would exceeding this > generate a "too many users" message or something? UNIX doesn't work real well with directories with large numbers of files in them. I'd try to keep it well under 100,000 session files. However, you can easily write a session handler that stuffs sessions in a database table rather than in files. This has advantages that the sessions can be accessed from multiple round-robin servers serving the same content (for when you run low on CPU power). That can probably handle a few hundred million simultaneous sessions (but probably not the associated hit rate unless you've got some really powerful hardware). Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 17, 2008 Author Share Posted April 17, 2008 If I stuff them in a database how can I delete them when finished? by the way... we are probably talking maybe 200 vars. Quote Link to comment Share on other sites More sharing options...
rameshfaj Posted April 18, 2008 Share Posted April 18, 2008 Database stuff will be relatively slower and occupy more space than the session stuffs,so I suggest u to go for session stuffs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.