search

Home  >  Q&A  >  body text

python - Scrapy 总是出现卡顿的情况

最近发现部分服务器上出现几个情况:

请教scrapy大神,

  1. scrapy在执行scrapy crawl price 后总是停顿十几秒才会打印出下一步的输出结果。

  2. 自动设置use-agent,会卡顿十几秒换下一个use-agent继续卡住。

有没有大神读过源码,知道这是什么情况吗?

PHPzPHPz2890 days ago602

reply all(3)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 09:05:18

    I won’t encounter long-term lags at the beginning, but long-term lags will occur after a long period of time.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:05:18

    There is nothing wrong with this and the source code. You have to take a look at your code, or post the spider code to take a look. Only then can we know the specific problem

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:05:18

    At least when I’m crawling data now, there’s no lag like you mentioned. There will only be a slight lag at the beginning of startup. I guess it is because there are too many files loaded. Your lagging situation. You have to see if it's because of the crawler you wrote. Please post the code.

    reply
    0
  • Cancelreply