Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.1k views
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
by

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.
by
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.
by
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?
http://question2answer.org/qa/52591/what-features-functions-q2a-and-plugins-are-updated-hourly
by
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.

http://stackoverflow.com/questions/2904862/issues-with-php-5-3-and-sessions-folder

http://stackoverflow.com/questions/2930870/zend-session-zend-auth-randomly-throws-error-message-ps-files-cleanup-dir-ope
by
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.
by
Thank you so much, Arjunsuresh and Sama.
But I'm afraid of accumulated garbage, it may not cause major problems in a big site?
by
edited by
If you are using Debian(Ubuntu), below thread may be useful.
http://serverfault.com/questions/511609/why-does-debian-clean-php-sessions-with-a-cron-job-instead-of-using-phps-built
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=267720

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.
by
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
by
Hi.

Today I noticed an important detail.

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