The easiest means to find out which module is setting a session for anonymous users is to examine the session field of the MySQL database table sessions
. It will often contain a hint as to what module is involved. To do this, run the following SQL statement from a MySQL client connected to the server:
SELECT * FROM sessions WHERE uid = 0 LIMIT 0, 10;
Another option is to use the SQL statement, SHOW FULL PROCESSLIST
. You can run this using the mysql
client or a script when you are connected to your Acquia Cloud server using SSH. When executing this SQL statement with a mysql
client, you may have to execute the command several times before a session setting action is caught, depending on the traffic on the site.
When connected with ssh to your Acquia Cloud server, the following command will repeatedly execute the SHOW FULL PROCESSLIST
statement, filter those records for the word session, and append the results to a log file in your home directory.
while true; do mysql {your connection details} \ -e "show full processlist" | grep "session" >> ~/session.log;done
You can view the connection details for each of your databases either on the Acquia Cloud Databases page by clicking Connection details from the list next to the database to which you want to connect, or by using the following command (where yoursite.environment
is your site and its environment):
drush @yoursite.environment ah-sql-connect
More Information