Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by
edited by
[Thu Aug 25 03:26:26 2016] [error] PHP Notice:  session_start(): ps_files_cleanup_dir: opendir(/var/lib/php/session) failed: Permission denied (13) in /var/www/vhosts/site/httpdocs/qa-include/app/users.php on line 146
Q2A version: 1.7

1 Answer

+2 votes

Priobably, you should check PHP settings by phpinfo.

  • session.gc_probability (Usualy: 1)
  • session.gc_divisor (Usualy: 100 /1000)
These are the settings of the starting probability of PHP garbage collection. If you are using "Debian / Ubuntu", you have to set to 0(Zero) to the gc_probability in php.ini.
This measure might induce other problems. If you set 0 to gc_probability, GC will not start. Therefore, there is a possibility that garbage of the session is accumulated... However, this may be not large issue.
edited by
Hi Sama.
Thanks for the answer.
Accumulate garbage may not cause major problems?

Currently, 2 minutes before each hour, my site is unavailable. This happens hourly.
Do you think this may be causing an error similar to this?
Yes, Exactly. This should be the issue for you. Garbage Collector can be set up via cron and that might be running hourly. Just set the clean up path to /tmp as given on second link.


edited by
Two problems might be related. But now can not prove the relationship, you should consider separately.

There are two scheduled processing method. First is "Real" cron job. This is kicked from Operationg system. Second is "Virtual" cron job. This is that plugin do the specific processing at a certain interval by using web access.

"Real" cron will be run in a INDEPENDENT PROCESS. So, generaly, web access does not delay so much. However, "virtual" cron will be run in the middle of the site access by users. So, the process of "virtual" cron must end immediately.

If heavy virtual cron job is running in the specific plugin, your site will be locked at fixed intervals. You may be able to identify "cron plugin" by uninstalling third-party plugin one by one.
Thank you so much, Arjunsuresh and Sama.
But I'm afraid of accumulated garbage, it may not cause major problems in a big site?
edited by
If you are using Debian(Ubuntu), below thread may be useful.

Standard garbage collector of the PHP seems to malfunction on Debian. If garbage collector is executed from CRON, standard garbage collector of the PHP would be unnecessary.
Unfortunately, I still can not make the change.
I have no knowledge in SSH and I am no FTP access to my server.
It is possible to make this change by .htacess?  Or any other way?
Control panel: Plesk

Today I noticed an important detail.

My server is CentOS 6.6
Update PHP can fix the problem?