increase somaxcon to match new linux default value
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
net.ipv4.tcp_fin_timeout = 30
|
||||
net.ipv4.ip_local_port_range = 1024 65535
|
||||
net.ipv4.tcp_fastopen = 3
|
||||
net.core.somaxconn = 2048
|
||||
net.core.somaxconn = 4096
|
||||
net.core.netdev_max_backlog = 5000
|
||||
vm.swappiness=1
|
||||
vm.dirty_ratio = 40
|
||||
|
@ -61,15 +61,15 @@ session.serialize_handler=igbinary
|
||||
apc.serializer=igbinary
|
||||
';
|
||||
const NGINX_DEFAULT = 'server {
|
||||
listen unix:/var/run/nginx/suspended backlog=2048 proxy_protocol;
|
||||
listen unix:/var/run/nginx/suspended backlog=4096 proxy_protocol;
|
||||
add_header Content-Type text/html;
|
||||
location / {
|
||||
return 200 \'<html><head><title>Suspended</title></head><body>This domain has been suspended due to violation of our <a href="http://' . ADDRESS . '">hosting rules</a>.</body></html>\';
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen [::]:80 ipv6only=off fastopen=100 backlog=2048 default_server;
|
||||
listen unix:/var/run/nginx.sock backlog=2048 default_server;
|
||||
listen [::]:80 ipv6only=off fastopen=100 backlog=4096 default_server;
|
||||
listen unix:/var/run/nginx.sock backlog=4096 default_server;
|
||||
root /var/www/html;
|
||||
index index.php;
|
||||
server_name ' . ADDRESS . ' *.' . ADDRESS . ';
|
||||
|
@ -75,7 +75,7 @@ if(!@$version=$db->query("SELECT value FROM settings WHERE setting='version';"))
|
||||
while($id=$stmt->fetch(PDO::FETCH_NUM)){
|
||||
$system_account=$id[0];
|
||||
$onion=substr($id[0], 0, 16);
|
||||
$replace=preg_replace("~listen\sunix:/var/run/nginx(/[a-z2-7]{16}|\.sock)(\sbacklog=2048)?;~", "listen unix:/var/run/nginx/$system_account backlog=2048;", file_get_contents("/etc/nginx/sites-enabled/$system_account"));
|
||||
$replace=preg_replace("~listen\sunix:/var/run/nginx(/[a-z2-7]{16}|\.sock)(\sbacklog=4096)?;~", "listen unix:/var/run/nginx/$system_account backlog=4096;", file_get_contents("/etc/nginx/sites-enabled/$system_account"));
|
||||
file_put_contents("/etc/nginx/sites-enabled/$system_account", $replace);
|
||||
}
|
||||
}
|
||||
@ -102,7 +102,7 @@ if(!@$version=$db->query("SELECT value FROM settings WHERE setting='version';"))
|
||||
$db->exec('ALTER TABLE onions DROP FOREIGN KEY onions_ibfk_1;');
|
||||
$db->exec('ALTER TABLE onions ADD CONSTRAINT onions_ibfk_1 FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE;');
|
||||
$nginx_default = 'server {
|
||||
listen unix:/var/run/nginx/suspended backlog=2048;
|
||||
listen unix:/var/run/nginx/suspended backlog=4096;
|
||||
add_header Content-Type text/html;
|
||||
location / {
|
||||
return 200 \'<html><head><title>Suspended</title></head><body>This domain has been suspended due to violation of <a href="http://' . ADDRESS . '">hosting rules</a>.</body></html>\';
|
||||
|
Reference in New Issue
Block a user