There are too many session files in php, the inode is used up, and the solution to the problem that apache cannot run

WBOY
Release: 2016-07-25 08:58:30
Original
1060 people have browsed it
  1. session.save_handler = eaccelerator
Copy code

The premise is that: eaccelerator has been installed.

2. Use session hierarchical directory Modify;session.save_path = "/tmp"

Modified to:

  1. session.save_path = "2;/tmp/session"
Copy the code

Use the secondary hash directory under the /tmp/session directory to store the session

php will not automatically create a hash directory. You need to manually create the corresponding directory and give permissions:

  1. find /tmp/session -amin +180 -exec rm -rf {} ;
Copy code

Instructions: Clean up once an hour, clean session files older than 3 hours.

The third method I currently use works well. You can also try the first one and see the effect.

Anyone who has a good method is welcome to share it with the Programmer’s Home for everyone to discuss together, haha.



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!