Bob Mottram 11 лет назад
Родитель
Сommit
20476e7613
1 измененных файлов: 25 добавлений и 11 удалений
  1. 25
    11
      beaglebone.txt

+ 25
- 11
beaglebone.txt Просмотреть файл

2043
 Search for MaxClients and replace the value with 6. As an example the settings should look something like this:
2043
 Search for MaxClients and replace the value with 6. As an example the settings should look something like this:
2044
 
2044
 
2045
 #+BEGIN_SRC: bash
2045
 #+BEGIN_SRC: bash
2046
-KeepAliveTimeout 2
2047
-Timeout 150
2046
+Timeout 30
2047
+KeepAlive On
2048
+MaxKeepAliveRequests 50
2049
+KeepAliveTimeout 10
2048
 
2050
 
2049
 <IfModule mpm_prefork_module>
2051
 <IfModule mpm_prefork_module>
2050
-  StartServers           1
2051
-  MinSpareServers        1
2052
-  MaxSpareServers        5
2053
-  ServerLimit           16
2054
-  MaxClients             5
2055
-  MaxRequestsPerChild    0
2056
-  ListenBacklog        100
2052
+  StartServers          3
2053
+  MinSpareServers       2
2054
+  MaxSpareServers       5
2055
+  MaxClients            10
2056
+  MaxRequestsPerChild   1000
2057
 </IfModule>
2057
 </IfModule>
2058
 
2058
 
2059
 <IfModule mpm_worker_module>
2059
 <IfModule mpm_worker_module>
2062
     MaxSpareThreads      75
2062
     MaxSpareThreads      75
2063
     ThreadLimit          64
2063
     ThreadLimit          64
2064
     ThreadsPerChild      25
2064
     ThreadsPerChild      25
2065
-    MaxClients            5
2065
+    MaxClients           10
2066
     MaxRequestsPerChild   0
2066
     MaxRequestsPerChild   0
2067
 </IfModule>
2067
 </IfModule>
2068
 
2068
 
2072
     MaxSpareThreads      75
2072
     MaxSpareThreads      75
2073
     ThreadLimit          64
2073
     ThreadLimit          64
2074
     ThreadsPerChild      25
2074
     ThreadsPerChild      25
2075
-    MaxClients            5
2075
+    MaxClients           10
2076
     MaxRequestsPerChild   0
2076
     MaxRequestsPerChild   0
2077
 </IfModule>
2077
 </IfModule>
2078
 #+END_SRC
2078
 #+END_SRC
2358
 
2358
 
2359
 If all has gone well then there should be no warnings or errors after you run the service restart command.  After that you should enable ports 80 (HTTP) and 443 (HTTPS) on your internet router/firewall, such that they are redirected to the BBB.
2359
 If all has gone well then there should be no warnings or errors after you run the service restart command.  After that you should enable ports 80 (HTTP) and 443 (HTTPS) on your internet router/firewall, such that they are redirected to the BBB.
2360
 
2360
 
2361
+Also limit the amount of memory which any php scripts can use.
2362
+
2363
+#+BEGIN_SRC: bash
2364
+emacs /etc/php5/apache2/php.ini
2365
+#+END_SRC
2366
+
2367
+Set the following:
2368
+
2369
+#+BEGIN_SRC: bash
2370
+memory_limit = 32M
2371
+#+END_SRC
2372
+
2373
+Save and exit.  Also edit */etc/php5/cli/php.ini* and set /memory_limit/ to the same value.  This should prevent any rogue scripts from crashing the system.
2374
+
2361
 ** Accessing your Email
2375
 ** Accessing your Email
2362
 
2376
 
2363
 #+BEGIN_VERSE
2377
 #+BEGIN_VERSE