nginx 限制并发连接数

[不指定 2008/10/03 17:57 | by real ]
本文摘抄自 http://wiki.codemongers.com/NginxChsHttpLimit_zoneModule?highlight=(limit)
limit_zone   limit  $binary_remote_addr  10m;
server {
location /download/ {
limit_conn   limit  1;
}
Tags:

一些跟网络有关的优化参数

[不指定 2008/10/01 03:43 | by real ]
记下来备忘
vi /etc/sysctl.conf
在末尾加入
Tags: , , ,
mysqldumpslow 平时主要用到的参数是
-s ORDER what to sort by (t, at, l, al, r, ar etc), ‘at’ is default
-t NUM just show the top n queries
-g PATTERN grep: only consider stmts that include this string
Tags:

MySQL 慢查询日志

[不指定 2008/10/01 03:37 | by real ]
老是忘了参数名怎么写的,记下来备忘
long_query_time = 1
log_slow_queries       = /backup/logs/mysql/mysql-slow.log
log-queries-not-using-indexes
其中 log-queries-not-using-indexes 可以动态修改
Tags:

mysql skip-name-resolve

[不指定 2008/10/01 03:30 | by real ]
新加的一台服务器,连接内网中的一台mysql服务器的时候,经常出现超时。
登陆到mysql,查看进程的信息
show processlist;
发现大量的进程的状态为 login
Tags:

php-fpm的一个异常状态

[不指定 2008/10/01 02:27 | by real ]
一台服务器上运行着nginx php(fpm) xcache,访问量日均 300W pv左右
最近经常会出现这样的情况: php页面打开很慢,cpu使用率突然降至很低,系统负载突然升至很高,查看网卡的流量,也会发现突然降到了很低。这种情况只持续数秒钟就恢复了
检查php-fpm的日志文件发现了一些线索
Tags: ,

varnish的安装和简单使用

[不指定 2008/10/01 01:38 | by real ]
1。下载 其官方主页在 http://varnish.projects.linpro.no/ 上面有各种相关的文档
cd /usr/src
wget http://www.sfr-fresh.com/unix/www/varnish-1.1.2.tar.gz
2。安装
Tags: