I have been running FreeBSD servers for many years with default settings without seeing this error message until November, 2015.
My /etc/sysctl.conf was:
That’s all.
When I saw this message the first time, I Googled and added a new line:
However,a few days ago I saw the message again on another server that already had the increased value. Apache was not working. I have no idea what to do.
The servers were running FreeBSD 10.1, Apache 2.4.17, Ruby on Rails with Passenger, Exim, Dovecot, PostgreSQL. I’m using pf. A few months ago I saw that pf complained about the number of the established connections. I don’t know whether it can be related.
I’m not even sure it was caused by Apache. netstat(1) didn’t tell me much, not that I knew how to read it and what to look for, I was just stressed and restarted Apache which solved the issue.
Except the regular updates, there were few changes on the servers.
1. I switched to HTTPS two days before I saw this error the first time. My sites are behind CloudFlare. Between CloudFlare and my sites there were HTTP communication. I generated self-signed keys with the following command:
And switched to HTTPS. This was new, however, I have been running Exim, PostgreSQL and Dovecot with self-signed keys for years.
I did not change anything else in Apache. I use more or less the default (example) SSL config. Apache is running with the Event module. I read that it might be a problem with SSL. I thought it was solved.
2. ClouldFlare recently started to support HTTP2. I turned it on. However, between CloudFlare and my servers, I’m not using HTTP2. It’s only working between the browsers and CF. I don’t know how they implemented it and how many connections they use. What I know is that I have never seen too many Passenger processes. I usually see 7-15, depending on the server, including the watchdog, the core and the launcher process. I can’t remember seeing too many httpd processes either.
3. When I saw the error message the second time (on the second server), Passenger was stuck on 100% CPU usage. I don’t know whether Passenger caused this error message, or this error made Passenger stuck.
Since I had no better idea, I switched to FreeBSD 10.2, upgraded to Apache 2.4.18, and upgraded the Passenger gems.
I also prayed and opened this topic.
I appreciate any input, and idea, what should I look for and what other setting than kern.ipc.somaxconn should I change.
Thank you.
My /etc/sysctl.conf was:
Code:
# Postgresql 9.2
kern.ipc.shmmax=1073741824
kern.ipc.shmall=262144
That’s all.
When I saw this message the first time, I Googled and added a new line:
Code:
kern.ipc.somaxconn=4096
However,a few days ago I saw the message again on another server that already had the increased value. Apache was not working. I have no idea what to do.
The servers were running FreeBSD 10.1, Apache 2.4.17, Ruby on Rails with Passenger, Exim, Dovecot, PostgreSQL. I’m using pf. A few months ago I saw that pf complained about the number of the established connections. I don’t know whether it can be related.
I’m not even sure it was caused by Apache. netstat(1) didn’t tell me much, not that I knew how to read it and what to look for, I was just stressed and restarted Apache which solved the issue.
Except the regular updates, there were few changes on the servers.
1. I switched to HTTPS two days before I saw this error the first time. My sites are behind CloudFlare. Between CloudFlare and my sites there were HTTP communication. I generated self-signed keys with the following command:
openssl req -x509 -days 1825 -newkey rsa:2048 -sha256 -nodes -keyout something.key -out something.crt
And switched to HTTPS. This was new, however, I have been running Exim, PostgreSQL and Dovecot with self-signed keys for years.
I did not change anything else in Apache. I use more or less the default (example) SSL config. Apache is running with the Event module. I read that it might be a problem with SSL. I thought it was solved.
2. ClouldFlare recently started to support HTTP2. I turned it on. However, between CloudFlare and my servers, I’m not using HTTP2. It’s only working between the browsers and CF. I don’t know how they implemented it and how many connections they use. What I know is that I have never seen too many Passenger processes. I usually see 7-15, depending on the server, including the watchdog, the core and the launcher process. I can’t remember seeing too many httpd processes either.
3. When I saw the error message the second time (on the second server), Passenger was stuck on 100% CPU usage. I don’t know whether Passenger caused this error message, or this error made Passenger stuck.
Since I had no better idea, I switched to FreeBSD 10.2, upgraded to Apache 2.4.18, and upgraded the Passenger gems.
I also prayed and opened this topic.
I appreciate any input, and idea, what should I look for and what other setting than kern.ipc.somaxconn should I change.
Thank you.