12 2017 档案
摘要:1.参考 https://doc.scrapy.org/en/latest/topics/spiders.html#scrapy.spiders.Spider.start_requests 自动提交 login.php 返回表单 https://doc.scrapy.org/en/latest/to
阅读全文
摘要:0. 1.参考 https://docs.python.org/3/library/urllib.html urllib is a package that collects several modules for working with URLs: urllib.request for open
阅读全文
摘要:0. 1.参考 【工作】Nginx限制IP并发连接数和请求数的研究 Module ngx_http_limit_conn_module Module ngx_http_limit_req_module 漏桶算法和 NGINX 的 limit_req 模块 漏桶这个名字,其实就非常形象的描述了算法本身
阅读全文
摘要:0. 1.参考 提升网站访问速度的 SQL 查询优化技巧 缓存一切数据,读取内存而不是硬盘IO 如果你的服务器默认情况下没有使用MySQL查询缓存,那么你应该开启缓存。开启缓存意味着MySQL 会把所有的语句和语句执行的结果保存下来,如果随后有一条与缓存中完全相同的语句需要执行,那么MySQL 就会
阅读全文
摘要:0. 1.问题 1.1现象: nginx error.log 提示 [error] 887#887: *58 FastCGI sent in stderr: "PHP message: PHP Warning: mysql_connect(): Headers and client library
阅读全文
摘要:现象: PHP查询数据库较慢,大约 60s 后 nginx 返回 504:Sorry, the page you are looking for is currently unavailable. 检查log: 从 /etc/nginx/nginx.conf 找到 /var/log/nginx/ac
阅读全文