我正在尝试使用DigitalOcean Droplet上托管的虚拟专用服务器。我是他们最小的计划,拥有512mb内存/ 20GB硬盘。
我已经安装了Lampp Stack,PhpMyAdmin和Proftpd。
我能够通过ftp上传测试index.php文件,并通过浏览器连接到IP,一切正常。
然后我上传了一个稍大的PHP项目,其中onload包含几个javascript / css文件,包括bootstrap和jquery。无法加载所有这些内容,Chrome会返回连接超时错误。
关于apache' error.log的尾部100返回以下内容:
[Fri Mar 18 09:56:31.137614 2016] [core:notice] [pid 8595] AH00094: Command line: '/usr/sbin/apache2'
sh: 1: /usr/sbin/sendmail: not found
sh: 1: /usr/sbin/sendmail: not found
[Fri Mar 18 12:35:21.665241 2016] [mpm_prefork:notice] [pid 8595] AH00169: caught SIGTERM, shutting down
[Fri Mar 18 12:35:26.723904 2016] [mpm_prefork:notice] [pid 10189] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Fri Mar 18 12:35:26.723959 2016] [core:notice] [pid 10189] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 18 12:42:59.770363 2016] [mpm_prefork:notice] [pid 10189] AH00169: caught SIGTERM, shutting down
[Fri Mar 18 12:43:36.105262 2016] [mpm_prefork:notice] [pid 1037] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Fri Mar 18 12:43:36.106454 2016] [core:notice] [pid 1037] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 18 13:48:31.612218 2016] [:error] [pid 1042] [client 91.196.50.33:33831] script '/var/www/html/testproxy.php' not found or unable to stat
自昨天以来以及在access.log
上没有返回任何错误==> access.log <==
87.113.229.42 - - [18/Mar/2016:19:42:56 -0400] "GET /mrsps/ HTTP/1.1" 200 3865 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
141.212.122.209 - - [18/Mar/2016:21:01:56 -0400] "GET / HTTP/1.1" 200 191 "-" "Mozilla/5.0 zgrab/0.x"
193.124.183.50 - - [19/Mar/2016:06:08:10 -0400] "GET / HTTP/1.1" 200 247 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0"
67.207.157.225 - - [19/Mar/2016:08:11:36 -0400] "GET / HTTP/1.0" 200 210 "-" "-"
67.207.157.225 - - [19/Mar/2016:08:11:37 -0400] "GET / HTTP/1.1" 200 210 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0"
67.207.157.225 - - [19/Mar/2016:08:11:39 -0400] "GET /CHANGELOG.txt HTTP/1.1" 404 469 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0"
67.207.157.225 - - [19/Mar/2016:08:11:39 -0400] "GET / HTTP/1.1" 200 210 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7"
67.207.157.225 - - [19/Mar/2016:08:11:40 -0400] "GET /readme.html HTTP/1.1" 404 467 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7"
87.113.229.42 - - [19/Mar/2016:09:15:18 -0400] "GET / HTTP/1.1" 200 247 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
87.113.229.42 - - [19/Mar/2016:09:15:21 -0400] "GET /mrsps/ HTTP/1.1" 200 3865 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
root@ubuntu-512mb-lon1-01:/var/log/apache2#
所有js和css文件都低于1mb,通常低于200kb,所以我不知道这是如何超时的...有关如何调试的任何建议吗?
编辑:
添加了free -h
答案 0 :(得分:0)
您可以尝试添加一些交换空间(以root身份执行)
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
另一种方法是减少应用程序使用的内存 - &gt;更多尝试https://superuser.com/