I'm having serious performance problems with Httpd on dedicated server. In traffic peaks httpd stucks on 512 connections and without any reason all connections are slow and files which are downloading are dropped with message: (btw. its high traffic server)
upstream prematurely closed connection while reading response header
Also worker connections are on the max with all params.
I have also tried to restart the server and change a config to max with tcp optimization and db, but it doesn't solve anything.
The queries log doesn't give any extra information. Could you please advice me how to fix or optimize that?
This throttling starts only with traffic peaks. Database runs on mariadb , Here is config for httpd:
<IfModule prefork.c> StartServers 3 MinSpareServers 20 MaxSpareServers 40 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 500 </IfModule>
Also I noticed that a lot of httpd processes are created.
I have max_connections on 1000, for table I use caching memcache, also with config on my.cf:
- table_open_cache = 256
- thread_cache_size = 12