We have a web application running multiple instances on different plesk servers. On one server we see quick generation of php session files under /var/lib/php/session directory. Which grows in 100 thousands in short period of time and clean-up of session files causes server load.

On other server we do not see such issue. What possible php (session) setting can cause creation hundreds of session files in seconds. it is looks like on each request to server cause creation of new session file. It does not look like php programatic issue because same application instance is running on other server not causing this issue.

Thank you for your suggestions.

  • I have seen other similar questions, but not exactly same. There ware solution on how clean files etc. Here I am looking for root cause why php creating so many files on one server only. – RayF May 13 '15 at 13:36
  • 2
    To me this sounds like sessions are not sticky, i.e. once a session is established connections for that session should always be sent to the same backend server – wurtel May 13 '15 at 13:42
  • Request always goes to same server. – RayF May 13 '15 at 13:55
  • Put your sessions in Redis and have the multiple instances all connect to a single Redis server. – user186340 May 13 '15 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.