Comments (5)
Just in case, could you make an update to 0.14.0. For me it looks like this:
Generated quickstart app
11:03:59.519 [debug] Starting data storage
11:03:59.524 [debug] Starting the manager for BooksToScrape
11:03:59.524 [debug] Starting requests storage worker for BooksToScrape...
11:03:59.524 [debug] Started 8 workers for BooksToScrape
Interactive Elixir (1.14.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> []
nil
iex(2)>
11:04:59.525 [info] Current crawl speed is: 0 items/min
11:04:59.525 [info] Current requests count is: 0
11:04:59.525 [info] Stopping BooksToScrape, all requests handled
from crawly.
@oltarasenko thanks for the quick response! I tried upgrading crawly to the latest version and I'm seeing the same error. I'll paste the complete log output below, there are a couple other debug
logs that I didn't paste in the original question, that look like they might be relevant. In case it matters, I'm using elixir version 1.14.
iex(1)> Crawly.Engine.start_spider(Homebase)
12:11:44.688 [debug] Starting the manager for Homebase
12:11:44.688 [debug] Starting requests storage worker for Homebase...
12:11:44.688 [debug] Started 4 workers for Homebase
:ok
iex(2)>
12:11:44.761 [warning] Description: 'Authenticity is not established by certificate path validation'
Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'
12:11:49.690 [debug] ** (exit) exited in: GenServer.call(#PID<0.2046.0>, {:store, [%Crawly.Request{url: "https://www.backcountry.com/search?q=pannier+bag", headers: [], prev_response: nil, options: [], middlewares: [Crawly.Middlewares.DomainFilter, Crawly.Middlewares.RequestOptions, Crawly.Middlewares.UniqueRequest, Crawly.Middlewares.RobotsTxt], retries: 0}]}, 5000)
** (EXIT) time out
(elixir 1.14.0) lib/gen_server.ex:1038: GenServer.call/3
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage_worker.ex:85: Crawly.RequestsStorage.Worker.do_call/2
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage.ex:101: Crawly.RequestsStorage.handle_call/3
(stdlib 4.0.1) gen_server.erl:1146: :gen_server.try_handle_call/4
(stdlib 4.0.1) gen_server.erl:1175: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
12:11:49.690 [error] GenServer #PID<0.2044.0> terminating
** (stop) exited in: GenServer.call(Crawly.RequestsStorage, {:store, {Homebase, [%Crawly.Request{url: "https://www.backcountry.com/search?q=pannier+bag", headers: [], prev_response: nil, options: [], middlewares: [Crawly.Middlewares.DomainFilter, Crawly.Middlewares.RequestOptions, Crawly.Middlewares.UniqueRequest, Crawly.Middlewares.RobotsTxt], retries: 0}]}}, 5000)
** (EXIT) time out
(elixir 1.14.0) lib/gen_server.ex:1038: GenServer.call/3
(elixir 1.14.0) lib/enum.ex:980: anonymous fn/3 in Enum.each/2
(elixir 1.14.0) lib/enum.ex:4307: anonymous fn/3 in Enum.each/2
(elixir 1.14.0) lib/stream.ex:1799: anonymous fn/3 in Enumerable.Stream.reduce/3
(elixir 1.14.0) lib/stream.ex:288: Stream.after_chunk_while/2
(elixir 1.14.0) lib/stream.ex:1828: Enumerable.Stream.do_done/2
(elixir 1.14.0) lib/enum.ex:4307: Enum.each/2
(crawly 0.14.0) lib/crawly/manager.ex:142: Crawly.Manager.handle_continue/2
Last message: {:continue, {:startup, [crawl_id: "5a7ba068-377d-11ed-9fe0-8c8590b36e7e"]}}
State: %{closespider_timeout_limit: nil, crawl_id: "5a7ba068-377d-11ed-9fe0-8c8590b36e7e", itemcount_limit: nil, name: Homebase, prev_scraped_cnt: 0, tref: #Reference<0.2326695856.574881794.250792>, workers: [ok: #PID<0.2047.0>, ok: #PID<0.2048.0>, ok: #PID<0.2049.0>, ok: #PID<0.2050.0>]}
12:11:49.691 [debug] Starting the manager for Homebase
12:11:49.691 [debug] Starting the manager for Homebase
12:11:49.692 [debug] ** (exit) exited in: GenServer.call(#PID<0.2046.0>, :pop, 5000)
** (EXIT) exited in: GenServer.call(Crawly.RequestsStorage, {:store, {Homebase, [%Crawly.Request{url: "https://www.backcountry.com/search?q=pannier+bag", headers: [], prev_response: nil, options: [], middlewares: [Crawly.Middlewares.DomainFilter, Crawly.Middlewares.RequestOptions, Crawly.Middlewares.UniqueRequest, Crawly.Middlewares.RobotsTxt], retries: 0}]}}, 5000)
** (EXIT) time out
(elixir 1.14.0) lib/gen_server.ex:1038: GenServer.call/3
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage_worker.ex:85: Crawly.RequestsStorage.Worker.do_call/2
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage.ex:114: Crawly.RequestsStorage.handle_call/3
(stdlib 4.0.1) gen_server.erl:1146: :gen_server.try_handle_call/4
(stdlib 4.0.1) gen_server.erl:1175: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
12:11:49.692 [debug] ** (exit) exited in: GenServer.call(#PID<0.2046.0>, :pop, 5000)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
(elixir 1.14.0) lib/gen_server.ex:1038: GenServer.call/3
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage_worker.ex:85: Crawly.RequestsStorage.Worker.do_call/2
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage.ex:114: Crawly.RequestsStorage.handle_call/3
(stdlib 4.0.1) gen_server.erl:1146: :gen_server.try_handle_call/4
(stdlib 4.0.1) gen_server.erl:1175: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
12:11:49.693 [debug] ** (exit) exited in: GenServer.call(#PID<0.2046.0>, :pop, 5000)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
(elixir 1.14.0) lib/gen_server.ex:1038: GenServer.call/3
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage_worker.ex:85: Crawly.RequestsStorage.Worker.do_call/2
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage.ex:114: Crawly.RequestsStorage.handle_call/3
(stdlib 4.0.1) gen_server.erl:1146: :gen_server.try_handle_call/4
(stdlib 4.0.1) gen_server.erl:1175: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
12:11:49.693 [debug] ** (exit) exited in: GenServer.call(#PID<0.2046.0>, :pop, 5000)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
(elixir 1.14.0) lib/gen_server.ex:1038: GenServer.call/3
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage_worker.ex:85: Crawly.RequestsStorage.Worker.do_call/2
(crawly 0.14.0) lib/crawly/requests_storage/requests_storage.ex:114: Crawly.RequestsStorage.handle_call/3
(stdlib 4.0.1) gen_server.erl:1146: :gen_server.try_handle_call/4
(stdlib 4.0.1) gen_server.erl:1175: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
12:11:49.694 [debug] Starting requests storage worker for Homebase...
12:11:49.694 [debug] Started 4 workers for Homebase
12:11:49.695 [error] GenServer #PID<0.2047.0> terminating
** (UndefinedFunctionError) function :ok.url/0 is undefined (module :ok is not available)
:ok.url()
(crawly 0.14.0) lib/crawly/fetchers/httpoison_fetcher.ex:11: Crawly.Fetchers.HTTPoisonFetcher.fetch/2
(crawly 0.14.0) lib/crawly/worker.ex:89: Crawly.Worker.get_response/1
(crawly 0.14.0) lib/crawly/worker.ex:48: Crawly.Worker.handle_info/2
(stdlib 4.0.1) gen_server.erl:1120: :gen_server.try_dispatch/4
(stdlib 4.0.1) gen_server.erl:1197: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: :work
State: %Crawly.Worker{backoff: 10000, spider_name: Homebase, crawl_id: "5a7ba068-377d-11ed-9fe0-8c8590b36e7e"}
12:11:49.697 [error] GenServer #PID<0.2048.0> terminating
** (UndefinedFunctionError) function :ok.url/0 is undefined (module :ok is not available)
:ok.url()
(crawly 0.14.0) lib/crawly/fetchers/httpoison_fetcher.ex:11: Crawly.Fetchers.HTTPoisonFetcher.fetch/2
(crawly 0.14.0) lib/crawly/worker.ex:89: Crawly.Worker.get_response/1
(crawly 0.14.0) lib/crawly/worker.ex:48: Crawly.Worker.handle_info/2
(stdlib 4.0.1) gen_server.erl:1120: :gen_server.try_dispatch/4
(stdlib 4.0.1) gen_server.erl:1197: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: :work
State: %Crawly.Worker{backoff: 10000, spider_name: Homebase, crawl_id: "5a7ba068-377d-11ed-9fe0-8c8590b36e7e"}
12:11:49.699 [error] GenServer #PID<0.2049.0> terminating
** (UndefinedFunctionError) function :ok.url/0 is undefined (module :ok is not available)
:ok.url()
(crawly 0.14.0) lib/crawly/fetchers/httpoison_fetcher.ex:11: Crawly.Fetchers.HTTPoisonFetcher.fetch/2
(crawly 0.14.0) lib/crawly/worker.ex:89: Crawly.Worker.get_response/1
(crawly 0.14.0) lib/crawly/worker.ex:48: Crawly.Worker.handle_info/2
(stdlib 4.0.1) gen_server.erl:1120: :gen_server.try_dispatch/4
(stdlib 4.0.1) gen_server.erl:1197: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: :work
State: %Crawly.Worker{backoff: 10000, spider_name: Homebase, crawl_id: "5a7ba068-377d-11ed-9fe0-8c8590b36e7e"}
12:11:49.701 [error] GenServer #PID<0.2050.0> terminating
** (UndefinedFunctionError) function :ok.url/0 is undefined (module :ok is not available)
:ok.url()
(crawly 0.14.0) lib/crawly/fetchers/httpoison_fetcher.ex:11: Crawly.Fetchers.HTTPoisonFetcher.fetch/2
(crawly 0.14.0) lib/crawly/worker.ex:89: Crawly.Worker.get_response/1
(crawly 0.14.0) lib/crawly/worker.ex:48: Crawly.Worker.handle_info/2
(stdlib 4.0.1) gen_server.erl:1120: :gen_server.try_dispatch/4
(stdlib 4.0.1) gen_server.erl:1197: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: :work
State: %Crawly.Worker{backoff: 10000, spider_name: Homebase, crawl_id: "5a7ba068-377d-11ed-9fe0-8c8590b36e7e"}
from crawly.
I just opened this PR against crawly. I'm not actually sure that this is a bug with the library itself. It almost seems like a GenServer bug or something's up with my environment... I really have no idea. But that change does fix the issue that I'm having. If you have any insight into what's going on, that would be much appreciated! I'm not super familiar with GenServer just yet.
from crawly.
Your initial request is not being stored by the RequestStorageWorker and is timing out due to an issue with your CA certs, I am assuming
This line is out of the ordinary and occurs just above the start of the errors.
12:11:44.761 [warning] Description: 'Authenticity is not established by certificate path validation'
Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'
This has nothing to do with the requests popping. the pop
returns :ok
because your initial start urls were not even stored.
There are a few possibilities:
- your initial request is not stored at all due to error in one of the middlewares. unlikely as stacktrace does not show this.
- cacerts issue is causing initial request error and resulting in the insertion loop when request failure results in a retry.
I would suggest investigating #2.
from crawly.
@azrosen92 please reopen if you are still unable to hunt down the issue even after the above.
from crawly.
Related Issues (20)
- Any working examples? HOT 4
- jl files not found probably not writing HOT 1
- Crawly.fetch giving 301 response instead of 200 HOT 1
- This is actually a question, Nested scraping HOT 2
- Genserver time out crash in long-running pipeline HOT 1
- Stop and resume the spider where it stopped HOT 2
- Protocol error HOT 7
- `Crawly.Fetchers.Fetcher` implementation for Playwright HOT 4
- robots.txt matching is pretty buggy HOT 10
- Running many instances of one spider HOT 3
- Make the management tool opt-in by default HOT 5
- Q: Can the spider "fan out" on a website? (multiple next items) HOT 1
- Error: Could not load spiders. HOT 5
- [error] Pipeline crash by call: Crawly.Middlewares.UniqueRequest.run
- Encountering Complications with Forwarding to Crawly.API.Router HOT 1
- Upgrade to `httpoison` 2.x? HOT 3
- management Web UI on localhost:4001 is not working HOT 4
- Does Crawly support requests using the POST method? HOT 1
- Crawly compilation warnings, undefined Floki functions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crawly.