diff --git a/README.md b/README.md index 1ce0abe..023707c 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,7 @@ The haserl version for slim devices without php ### Requirements * haserl * netcat with ipv6 support + +## Apache 2 settings +To avoid OOM Killer it's usefull to reduce the MaxConnectionsPerChild on apache2. On Debian open /etc/apache2/mods-enabled/mpm_prefork.conf and reduce MaxConnectionsPerChild. +Do not use more then 10 MaxConnectionsPerChild per Gigabyte RAM on your System. diff --git a/index.php b/index.php index 6eb81f9..56b242b 100644 --- a/index.php +++ b/index.php @@ -23,7 +23,10 @@ '.$file.''); + + if (filemtime($file) < time()-10) { + shell_exec('echo "dump" | nc ::1 33123 -q 1 > '.$file.''); + } $file_handle = fopen($file, 'r'); $set=0;