All our errors are logged to NewRelic, and we always saw a few warnings of
session_write_close in the error log. However, the error rate is increased and it is now flooding our 24h log.
Our server is highly populated and lots of users are logged in at the same time. Most of these users don't don't see these
session_write_close warnings. Some do, which makes it almost impossible for us to find the cause and fix it.
This is the full error message:
Error message E_WARNING: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/opt/php55/var/lib/php/session-nginx)
So I did a check, see how many files are in that directory
9431 and what the rights were
-rw------- 1 nginx nginx.
I don't see anything wrong with my configuration, file rights etc..
We are out of options. What can I do to resolve this issue? Currently affecting < 1% of our users, we just want to keep our rate as low as possible.
Here is a list of my php.ini configuration.
Directive Local Value Master Value session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file /dev/urandom /dev/urandom session.entropy_length 32 32 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 5 5 session.hash_function 0 0 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /opt/php55/var/lib/php/session-nginx /opt/php55/var/lib/php/session-nginx session.serialize_handler php php session.upload_progress.cleanup On On session.upload_progress.enabled On On session.upload_progress.freq 1% 1% session.upload_progress.min_freq 1 1 session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS session.upload_progress.prefix upload_progress_ upload_progress_ session.use_cookies On On session.use_only_cookies On On session.use_strict_mode Off Off session.use_trans_sid 0 0
Some server stats: CentOS 6.6 PHP 5.5.28 Nginx 1.6.2 Any help is welcome!