nginx 限制并发连接数
[
2008/10/03 17:57 | by real ]
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;
}
limit_zone limit $binary_remote_addr 10m;
server {
location /download/ {
limit_conn limit 1;
}
一些跟网络有关的优化参数
[
2008/10/01 03:43 | by real ]
2008/10/01 03:43 | by real ]
MySQL 自带的 slow log 分析工具 mysqldumpslow
[
2008/10/01 03:40 | by real ]
2008/10/01 03:40 | by real ]
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
-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
MySQL 慢查询日志
[
2008/10/01 03:37 | by real ]
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 可以动态修改
long_query_time = 1
log_slow_queries = /backup/logs/mysql/mysql-slow.log
log-queries-not-using-indexes
其中 log-queries-not-using-indexes 可以动态修改
mysql skip-name-resolve
[
2008/10/01 03:30 | by real ]
2008/10/01 03:30 | by real ]
php-fpm的一个异常状态
[
2008/10/01 02:27 | by real ]
2008/10/01 02:27 | by real ]
一台服务器上运行着nginx php(fpm) xcache,访问量日均 300W pv左右
最近经常会出现这样的情况: php页面打开很慢,cpu使用率突然降至很低,系统负载突然升至很高,查看网卡的流量,也会发现突然降到了很低。这种情况只持续数秒钟就恢复了
检查php-fpm的日志文件发现了一些线索
最近经常会出现这样的情况: php页面打开很慢,cpu使用率突然降至很低,系统负载突然升至很高,查看网卡的流量,也会发现突然降到了很低。这种情况只持续数秒钟就恢复了
检查php-fpm的日志文件发现了一些线索
varnish的安装和简单使用
[
2008/10/01 01:38 | by real ]
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。安装
cd /usr/src
wget http://www.sfr-fresh.com/unix/www/varnish-1.1.2.tar.gz
2。安装





