I've encountered a similar problem (in my case, using
Apache::Session::File). Sessions are created just fine, but when adding
new data to the session hash, it gets written to disk only *some* times.
I've been using Apache::Session in a web application for years now and
have never seen this before. I recently switched from Gentoo to Ubuntu
in my development machine, and I suspect it has to do with Apache2
being compiled as MPM Worker:
(
http://httpd.apache.org/docs/2.2/mod/worker.html)
# apache2 -V
Server version: Apache/2.2.3
Server built: Jan 15 2007 18:11:52
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 32-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/worker"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
Is there anything that can be done to avoid this, other than compiling
Apache as MPM prefork?
Thanks in advance,
cv