reisetroll
New Member
Hallo,
schon seit längerer Zeit kämpfe ich mit einem Problem, das ziemlich mühsam ist:
Hab den dedicated Server AX60-SSD bei Hetzner (https://www.hetzner.de/dedicated-rootserver/ax60-ssd) mit Debian 9, NGINX und Mariadb, PHP 7.0 und PHP 7.2 nach dem perfect server tutorial aufgesetzt. Darauf laufen einige Wordpress-Seiten mit insgesamt ca 1000 Zugriffen pro Tag, Shopware in der neuesten Version und Woltlab Burning Board 4.1.20.
In unregelmäßigen Abständen ist der Server nicht mehr erreichbar, so dass nur mehr ein Reset über den Hetzner Robot hilft, da ein SSH Zugriff auch nicht mehr möglich ist.
irgendwie hab ich MariaDB in Verdacht, dass da das Problem begraben ist, bin aber da etwas ratlos...
Im Anhang mal ein paar relevante Config- und Log-Files.
Wäre für jede Hilfe dankbar, bzw wär mir auch schon geholfen, wenn mir wer sagen könnte, in welche Richtung ich noch suchen könnte, da mir das schon viel Zeit und Nerven geraubt hat.
PHP-Memory Limit = 256MB (für alle Seiten)
PHP-Einstellungen für die Wordpress-Seite mit ca 1000 Zugriffen pro Tag:
pm = ondemand
pm.max_children = 500
pm.process_idle_timeout = 1s;
pm.max_requests = 1000
alle anderen:
pm = dynamic
pm.max_children = 500
pm.start_servers = 20
pm.min_spare_servers = 1
pm.max_spare_servers = 100
pm.max_requests = 0
/etc/nginx/nginx.conf
/etc/mysql/mariadb.conf.d/50-server.cnf
schon seit längerer Zeit kämpfe ich mit einem Problem, das ziemlich mühsam ist:
Hab den dedicated Server AX60-SSD bei Hetzner (https://www.hetzner.de/dedicated-rootserver/ax60-ssd) mit Debian 9, NGINX und Mariadb, PHP 7.0 und PHP 7.2 nach dem perfect server tutorial aufgesetzt. Darauf laufen einige Wordpress-Seiten mit insgesamt ca 1000 Zugriffen pro Tag, Shopware in der neuesten Version und Woltlab Burning Board 4.1.20.
In unregelmäßigen Abständen ist der Server nicht mehr erreichbar, so dass nur mehr ein Reset über den Hetzner Robot hilft, da ein SSH Zugriff auch nicht mehr möglich ist.
irgendwie hab ich MariaDB in Verdacht, dass da das Problem begraben ist, bin aber da etwas ratlos...
Im Anhang mal ein paar relevante Config- und Log-Files.
Wäre für jede Hilfe dankbar, bzw wär mir auch schon geholfen, wenn mir wer sagen könnte, in welche Richtung ich noch suchen könnte, da mir das schon viel Zeit und Nerven geraubt hat.
PHP-Memory Limit = 256MB (für alle Seiten)
PHP-Einstellungen für die Wordpress-Seite mit ca 1000 Zugriffen pro Tag:
pm = ondemand
pm.max_children = 500
pm.process_idle_timeout = 1s;
pm.max_requests = 1000
alle anderen:
pm = dynamic
pm.max_children = 500
pm.start_servers = 20
pm.min_spare_servers = 1
pm.max_spare_servers = 100
pm.max_requests = 0
/etc/nginx/nginx.conf
Code:
user www-data;
worker_processes 16;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
worker_rlimit_nofile 100000;
events {
#snie 20171215 #snie 20180205 raised worder_connections 1024 -> 2048
use epoll;
worker_connections 8192;
multi_accept on;
}
http {
map $remote_addr $ip_anonym1 {
default 0.0.0;
"~(?P<ip>(\d+)\.(\d+)\.(\d+))\.\d+" $ip;
"~(?P<ip>[^:]+:[^:]+):" $ip;
}
map $remote_addr $ip_anonym2 {
default .0;
"~(?P<ip>(\d+)\.(\d+)\.(\d+))\.\d+" .0;
"~(?P<ip>[^:]+:[^:]+):" ::;
}
map $ip_anonym1$ip_anonym2 $ip_anonymized {
default 0.0.0.0;
"~(?P<ip>.*)" $ip;
}
log_format anonymized '$ip_anonymized - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$host" sn="$server_name" ' 'rt=$request
_time ' 'ua="$upstream_addr" us="$upstream_status" ' 'ut="$upstream_response_time" ul="$upstream_response_length" ' 'cs=$upstream_cache_status' ;
##
# Basic Settings
##
sendfile on;
fastcgi_keep_conn on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 5;
open_file_cache_errors off;
##
# Logging Settings
##
access_log /var/log/nginx/access.log main_ext;
error_log /var/log/nginx/error.log debug;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
gzip_vary on;
# Turn on gzip for all content types that should benefit from it.
gzip_types application/ecmascript;
gzip_types application/javascript;
gzip_types application/json;
gzip_types application/pdf;
gzip_types application/postscript;
gzip_types application/x-javascript;
gzip_types image/svg+xml;
gzip_types text/css;
gzip_types text/csv;
# "gzip_types text/html" is assumed.
gzip_types text/javascript;
gzip_types text/plain;
gzip_types text/xml;
gzip_http_version 1.0;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
#include /etc/nginx/naxsi_core.rules;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*.*;
client_max_body_size 400M;
}
/etc/mysql/mariadb.conf.d/50-server.cnf
Code:
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
# this is read by the standalone daemon and embedded servers
[server]
# this is only for the mysqld standalone daemon
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
#key_buffer_size = 16M
key_buffer_size = 64M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam_recover_options = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
#query_cache_limit = 1M
#query_cache_size = 16M
query_cache_size = 128M
query_cache_limit = 2M
join_buffer_size = 32M
innodb_buffer_pool_instances = 32
tmp_table_size= 4G
max_heap_table_size= 4G
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Enable the slow query log to see queries with especially long duration
#slow_query_log_file = /var/log/mysql/mariadb-slow.log
#long_query_time = 10
#log_slow_rate_limit = 1000
#log_slow_verbosity = query_plan
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = exclude_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# Set buffer pool size to 50-80% of your computer's memory
innodb_buffer_pool_size=32768M
innodb_additional_mem_pool_size=2048M
#
# Set the log file size to about 25% of the buffer pool size
innodb_log_file_size=4G
innodb_log_buffer_size=1024M
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
open_files_limit = 1024000
table_open_cache = 8000
# this is only for embedded server
[embedded]
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
# This group is only read by MariaDB-10.1 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.1]