Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a PHP script that will store session hash in the database for each client (who's online table). I don't know why, but recently I noticed almost all clients have multiple session ids. I don't remember changing the configuration of the server. Also, some clients like myself only have 1 session id, which is weird...

Since, almost each clients have multiple sessions, multiple session files are also created on the server. And every time they navigate to another page, which by the way will update their activity by executing an SQL query, the query is also executed multiple times for each session ids they have. And now the server is constantly getting a high CPU load and excessive memory usage.

Can someone tell me what's wrong? I have a CentOS VPS (5.5 x64)

share|improve this question
do these people having <multi-sessionS use a different DNS? Have you tried accessing the website from an external network? Maybe you can check the content of the cookies you're sending. To debug sessions we'll need info of what your application is sending. –  regilero May 2 '11 at 17:47
Are you also logging UserAgents and IP addresses? If so, you should make sure this isn't just a case of people using multiple computers, or multiple browsers. Some of the users could also be using IE8, and using the "new session" feature instead of just new tab or window, which does just like it sounds, and causes cookies/sessions to not persist between browser windows. –  walkeran May 3 '11 at 11:13
@walkeran No, I'm pretty sure they're using 1 browser and 1 computer... Sometimes, they have 22 sessions created, I doubt that they have 22 browsers or have 22 computers running just to visit my site. @regilero I'm pretty sure my PHP script is sending the cookies correctly, I also noticed that my vBulletin installation is suffering from this issue too! So either the VPS is acting up, or something else other than the script is wrong –  Kemal Fadillah May 4 '11 at 6:41
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.