T
T
tvoyadres2020-02-20 14:19:10
Apache HTTP Server
tvoyadres, 2020-02-20 14:19:10

Apache Httpd not ending processes by timeout?

Server Xeon 2690 v2 + Mem 128Gb + SSD Centos
6.10 system Nginx + Httpd Prefork + Ispmanager
5
Lite to the site and their connection is torn, I get a hung process.
I've been watching a server for 2 days now and periodically reboot.

A similar problem arose and on the second server it was weaker and just fell, I cleaned the mysql database there today in order to start running faster until it fell.

Tomorrow I'll try to transfer everything to a more powerful machine.

PS
server-status turned on, there is nothing separate, even pictures hang, and ordinary pages

apache config
<IfModule prefork.c>
StartServers 2
MinSpareServers 2
MaxSpareServers 4
ServerLimit 16384
MaxClients 8192
MaxRequestsPerChild 0 
</IfModule>

Конфиг нгикс
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;
worker_rlimit_nofile 65535;

events {
    worker_connections  4096;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  120;

    #gzip  on;

    server_names_hash_bucket_size 512;
    server_names_hash_max_size 4096;
    client_header_timeout 240s;
    client_body_timeout 240s;
    send_timeout 240s;
    proxy_buffer_size 32k;
    proxy_buffers 8 16k;
    proxy_busy_buffers_size 32k;
    client_body_buffer_size 128k;
    client_max_body_size 128m;
    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/vhosts/*/*.conf;
server {
  server_name localhost;
 	disable_symlinks if_not_owner;
  listen 80;
  listen [::]:80;
  include /etc/nginx/vhosts-includes/*.conf;
  location @fallback {
    error_log /dev/null crit;
    proxy_pass http://127.0.0.1:8080;
    proxy_redirect http://127.0.0.1:8080 /;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    access_log off ;
  }
    }
}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Viktor Taran, 2020-02-20
@shambler81

StartServers 2
MinSpareServers 2
MaxSpareServers 4
Are you seriously?

T
tvoyadres, 2020-02-20
@tvoyadres

If you run the command

netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1

1
1 104.20.16.242
1 77.75.129.83
1 88.212.201.216
1 95.163.255.250
1 95.163.36.5
2 0.0.0.0
2 95.163.255.93
2 95.163.255.94
3 95.163.255.83
3 95.163.255.86
4 95.163.255.82
4 95.163.255.85
4 95.163.255.87
4 95.163.255.97
5 95.163.255.95
5 95.163.255.98
6 95.163.255.88
6 95.163.255.92
6 95.163.255.96
6 95.163.255.99
8 95.163.255.89
4158 127 127.0.0.1
something bothers me the last line on port 80, I have a stub hanging with a redirect to another site.

V
Vitaly Karasik, 2020-02-20
@vitaly_il1

The problem is that Apache does not kill hung processes, they hang until the server is restarted
timeout does not work, I suspect a breakdown in mobile clients that go to the site and their connection is broken, I get a hung process.

1) What is the problem with the server? Works slowly, crashes?
2) What's in Apache's error.log?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question