作者归档:杨龙
nginx proxy_pass使用gzip传输节约内部流量
location / {
...
proxy_set_header Accept-Encoding "gzip";
...
proxy_pass ...;
}
PHP笛卡尔积的一种实现方式
_reindex
__construct、register_shutdown_function、__destruct执行顺序
run __construct
run shutdown_function
run __destruct
* unset 等操作可以提前触发 __destruct
可以利用变量作用域在__destruct内来释放连接、解锁等释放操作
深度优先搜索 dfs php版
启用 opcache.enable_cli 也需要小心
opcache.enable_cli + xdebug + swoole 可能会导致“段错误”(Segmentation fault)
慎用Nginx限流功能,不要一直开着nginx限流
nginx限流可能会导致客户访问感知到变慢,所以在怕爬虫或攻击停止的时候应该关闭限流!
限流的阈值、突发速率之类的需要尽量大点,大概峰值的几倍这样,防止正常用户被迫全局限流。
$realpath_root 和 $document_root 区别
Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this operation
root@% 无法修改 root@localhost 密码
解决办法:(自己给自己授权)
grant system_user on *.* to 'root';
https://blog.csdn.net/weixin_42330311/article/details/104728396