简体   繁体   中英

AH02026: Failed to acquire SSL session cache lock

First post, apologies if I get anything wrong.

Apache/2.4.6 (CentOS 7)

I am seeing repeated warnings in the ssl_error_logs of many of my virtual hosts. The warnings are:

[ssl:warn] [pid 8995] (22)Invalid argument: AH02027: Failed to release SSL session cache lock

[ssl:warn] [pid 8997] (22)Invalid argument: AH02026: Failed to acquire SSL session cache lock

If I restart httpd these errors go away for up to a few days but then re-appear.

I have read around this issue but can find no solution. Can anyone help?

I have the same problem with Apache/2.4.41 on Ubuntu 20.04.3 LTS. I have not been able to figure out a solution. An apache2-restart solves the problem for a while (minutes to hours), then it comes back. It re-occurs faster when the apache2-load is higher. Because of this my apache error-logfiles are nearly as big as my access-logfiles. I have not touched the SSL configuration coming with the distribution, so I assume that this is a common problem on sites with heavy load.

Does it make sense to disable SSL caching completely? SSL caching does not seem to work correctly anyway.

This happens when the APACHE_RUN_USER is used for ssh login purposes too. Then systemd clears all the locks of the user during logout including the locks used by apache2.

The solution is to prevent systemd from removing the locks:

Add the following line to /etc/systemd/logind.conf

RemoveIPC=no

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM