I've installed Redis to handle PHP sessions (and caching purposes). When I load the homepage of my website, the following happens.
One session ID is generated.
$ redis-cli 127.0.0.1:6379> keys * 1) "PHPREDIS_SESSION:3g8sdqkj51btah10v88vapkr57"
On web server
10+ session IDs are generated.
$ redis-cli 127.0.0.1:6379> keys * 1) "PHPREDIS_SESSION:sgp4gop68st6iqmgnrti76tqn4" 2) "PHPREDIS_SESSION:2sstonql09hreokd14gba5csr2" 3) "PHPREDIS_SESSION:kv7cjhpgq8o2dkuglcg3rqj955" 4) "PHPREDIS_SESSION:2m07rtut3qt0k0ujuvftp0g3g3"
(... and about 10 more session keys)
The other thing is that for every refresh of the homepage, the redis server on the web host seems to instantiate around 2-10 new PHP sessions, while on localhost it just stays at one session all the time.
There's probably a good reason for this, and I'm hoping that anyone could explain this to me.
Could it have anything to do with the web page on the web server actually loading many external resources, which get their own session? Or could it be that I have configured something incorrectly? Both pages are identical in PHP code.
I'm not sure what more information I can provide for helping answer this question better, but please ask for anything.