全球主机交流论坛

标题: [求测试 ~~]网站访问很慢很慢,可能是php问题??? [打印本页]

作者: Auston    时间: 2011-4-8 16:21
标题: [求测试 ~~]网站访问很慢很慢,可能是php问题???
Ubuntu 10.04
nginx--0.8.54
php--5.32
php5-fpm

/etc/nginx/nginx.conf
  1. uer www-data;
  2. worker_processes 1;
  3. pid /var/run/nginx.pid;

  4. worker_rlimit_nofile 8192;

  5. events {
  6.     worker_connections 4096;
  7. }

  8. http {
  9.     include /etc/nginx/mime.types;
  10.     include /etc/nginx/fastcgi_params;
  11.     default_type application/octet-stream;

  12.     sendfile on;
  13.     tcp_nopush on;

  14.     server_names_hash_bucket_size 128;
  15.     clirge_client_header_buffers 4 32k;
  16.     client_max_body_size 8m;
  17.     client_header_buffer_size 32k;

  18.     log_format   main '$remote_addr - $remote_user [$time_local]  $status '
  19.       '"$request" $body_bytes_sent "$http_referer" '
  20.       '"$http_user_agent" "$http_x_forwarded_for"';

  21.     access_log /var/log/nginx/access.log main;
  22.     error_log /var/log/nginx/error.log;
  23.     include /etc/nginx/sites-enabled/*;
  24. }
复制代码
/etc/nginx/site-enable/default
  1. server {
  2.     listen      80;
  3.     server_name  aoy.me;
  4.     root         /var/www;

  5.     location / {
  6.         index  index.html index.php;
  7.      }

  8.     location ~* \.(gif|jpg|png)$ {
  9.         expires   30d;
  10.      }

  11.     location ~ \.php$ {
  12.          fastcgi_pass   127.0.0.1:9000;
  13.      }
  14. }
复制代码
/etc/nginx/fastcgi_params;
  1. tcgi_param   QUERY_STRING        $query_string;
  2. fastcgi_param   REQUEST_METHOD      $request_method;
  3. fastcgi_param   CONTENT_TYPE        $content_type;
  4. fastcgi_param   CONTENT_LENGTH      $content_length;

  5. fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
  6. fastcgi_param   SCRIPT_NAME         $fastcgi_script_name;
  7. fastcgi_param   REQUEST_URI         $request_uri;
  8. fastcgi_param   DOCUMENT_URI        $document_uri;
  9. fastcgi_param   DOCUMENT_ROOT       $document_root;
  10. fastcgi_param   SERVER_PROTOCOL     $server_protocol;

  11. fastcgi_param   GATEWAY_INTERFACE   CGI/1.1;
  12. fastcgi_param   SERVER_SOFTWARE     nginx/$nginx_version;

  13. fastcgi_param   REMOTE_ADDR         $remote_addr;
  14. fastcgi_param   REMOTE_PORT         $remote_port;
  15. fastcgi_param   SERVER_ADDR         $server_addr;
  16. fastcgi_param   SERVER_PORT         $server_port;
  17. fastcgi_param   SERVER_NAME         $server_name;

  18. fastcgi_index   index.php;

  19. fastcgi_param   REDIRECT_STATUS     200;
复制代码
/etc/php5/fpm/php5-fpm.conf
  1. bal]
  2. pid = /var/run/php5-fpm.pid
  3. error_log = /var/log/php5-fpm.log
  4. [www]
  5. listen = 127.0.0.1:9000

  6. user = www-data
  7. pm = static
  8. pm.max_children = 12
  9. pm.start_servers = 4
  10. pm.min_spare_servers = 5
  11. pm.max_spare_servers = 10

  12. rlimit_files = 51200
复制代码
网址为   http://aoy.me/
    首页为phpinfo()   
很慢很慢才能显示出来

刚用lnmp.org的脚本一键安装之后 貌似还是很慢很慢

[ 本帖最后由 Auston 于 2011-4-8 18:16 编辑 ]
作者: wdlth    时间: 2011-4-8 16:41
IO多快呢?
作者: Auston    时间: 2011-4-8 16:47
怎么看IO 。。。
作者: Auston    时间: 2011-4-8 17:03
dd if=/dev/zero of=/root/zerofile bs=1M count=256

508 MB/s
作者: 小夜    时间: 2011-4-8 17:05
5.3换成5.217或14呢?你换lnmp一键包试一下呢?确实不快。
作者: 李院长    时间: 2011-4-8 17:36
一点都不觉得慢
作者: Auston    时间: 2011-4-8 17:39
好吧~

   lnmp一键安装包。。。
作者: Auston    时间: 2011-4-8 18:05
难道是网络线路的问题。。。。

一键安装之后还是那么慢。。。
作者: msxcms    时间: 2011-4-8 18:07
keep-alive 在网络情况不好的时候,有很大作用
作者: Auston    时间: 2011-4-8 18:37
貌似还是php问题

访问 纯 html 文件网址 没任何问题
作者: 有个就好    时间: 2011-4-8 18:39
worker_rlimit_nofile 8192;

events {
    worker_connections 4096;
}

这里多写点不会收费!
作者: webproxy    时间: 2011-4-8 18:44
Processed in 0.0051 seconds.
这还慢?
话说84的线路实在是悲剧
作者: Auston    时间: 2011-4-10 14:46
原帖由 webproxy 于 2011-4-8 18:44 发表
Processed in 0.0051 seconds.
这还慢?
话说84的线路实在是悲剧


    我这php页面很慢啊
作者: yexinzhu    时间: 2011-4-10 14:48
我觉得一点也不慢......你网速问题把?
作者: Auston    时间: 2011-4-10 15:01
我访问  http://wiki.aoy.me  是一瞬间就好
  但 Php  的就一直转啊转的 ,很久才加载完全。。。




欢迎光临 全球主机交流论坛 (https://lilynana.eu.org/) Powered by Discuz! X3.4