Closed Tobeyforce closed 3 years ago
It may be an issue of Scrapyd or scrapy-selenium.
It may be an issue of Scrapyd or scrapy-selenium.
Alright, I will try to see if I can solve it from their end. Another question: Is it possible to schedule a spider to run at an interval of 45 seconds? I tried using */45 in the seconds tab of the extended timer settings. However, it will e.g run like this:
2020-09-30 01:27:45 2020-09-30 01:28:00 2020-09-30 01:28:45 2020-09-30 01:29:00
Why does it run with 15 second gap, then 45?
If I run /30 it will run every 30 second at interval, but /45 does not work.
Because both 0 and 45 are divisible by 45. Does it make sense to schedule a spider run every 45 second? Why not do in a loop in the spider instead?
Thanks for the answer, I guess I don't really 100% understand how apscheduler works. In my case it makes sense (I think), I need to run spiders indefinitely every 45 seconds except perhaps on weekends. I could go with every minute or 30sec but I'm trying to hit a sweet spot.
Is it possible to schedule every 45 sec? In that case, how?
Maybe you can add 3 tasks?
0 45 90 135 180
0’0 0’45 1’30 2’15 3’0 3’45 4’30 5’15 6’0 6’45 7’30 8’15
min: */3 sec: 0,45
min: 1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 sec: 30
min:2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 sec: 15
Huge thanks, I really appreciate you taking your time This worked, I'll just have to make multiple timers then. Only problem is I will have 300 timer tasks for 100 spiders, haha! Thanks again spiderman, you are the boss.
Describe the bug I am trying out the scrapy-selenium package from https://github.com/clemfromspace/scrapy-selenium and have deployed a spider on scrapydweb that implements the chromedriver. The spider works perfect when run without scrapydweb, but for some reason when I run it through scrapydweb I receive 2 critical errors by the end (although the items are succesfully scraped) Scrapydweb seems to be closing spider too fast. I have more than enough memory/cpu available. I don't encounter the same problem with another spider that also implements scrapy-selenium. Maybe some kind of timeout error? Perhaps both scrapydweb and scrapy-selenium tries to close the connection? I'm very confused because sometimes I get the errors, and sometimes not.
Logs
Environment (please complete the following information):