1

we want to know how many session files are creating in session folder.

we are running this command from root directory of magento

ls -l | wc -l

when we run this command, we can see

thousands of sessions files are creating.

this is live site with less number of users visiting the site.

we also have mobile app for our site.

we want to know why this much sessions are creating.

almost 40,000 sessions are created until now lastin one hour.

enter image description here

1 Answer 1

1

I have faced same issue in previous year. You might get some help I am posting here.
To handle session properly, take a look at http://ar.php.net/manual/en/session.configuration.php.

There you'll find these variables:

  • session.gc_probability
  • session.gc_divisor
  • session.gc_maxlifetime

These control the garbage collector (GC) probability of running with each page request.

You could set those with ini_set() at the beginning of your script or .htaccess file so you get certainty to some extent they will get deleted sometime.

Reference : from here. Also see here

1
  • it was coming from one I.p. we blocked it. now it reduced. but what you gave is really a great information, we will check it..... Commented Mar 3, 2016 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.