mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-25 12:15:50 +03:00
[GH-ISSUE #303] [BUG] Slow search on Raspberry Pi and incorrect env variables #210
Labels
No labels
Fixed (Pending PR Merge)
Stale
bug
enhancement
enhancement
good first issue
help wanted
keep-open
needs more info
pull-request
question
theme
unfortunate
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whoogle-search#210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @accountForIssues on GitHub (May 2, 2021).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/303
Describe the bug
Deployment Method
runexecutableVersion of Whoogle Search
Server
Raspberry Pi 4 4GB
Linux alarm 5.11.4-1-ARCH #1 SMP Sun Mar 7 23:46:10 UTC 2021 aarch64 GNU/LinuxAdditional context
It started a few days ago and I don't think I've made any drastic changes. I tried recreating containers, restarting system, etc. Nothing has worked so far.
docker-compose.yml
whoogle.env
Logs seem to be normal except for one:
Doing an
nslookup suggestqueries.google.comon the host works fine and whoogle has worked fine in the past so I dunno what happened.Moreover, (maybe I'm doing it wrong), whoogle doesn't seem to pickup whoogle.env values. Doing a
echo $WHOOGLE_ALT_TWprints the default value. Doing acat whoogle.envinside the container reveals the custom settings so I don't know why whoogle is picking the default values.@benbusby commented on GitHub (May 3, 2021):
The correct way to load an environment variable file when using docker-compose is actually the
env_fileoption -- sorry, I should've documented that better. It should look something like this:The only other issue is that some of the variables in your
whoogle.envfile still have comments after them, which is likely to cause problems (my fault for not arranging the comments better). I'll updatedocker-compose.ymlwith theenv_fileoption and fix the comments in thewhoogle.envtemplate.Regarding the slow searches on your Pi, that's been a somewhat known issue for a while. I haven't been able to track down why exactly it's so slow on the Pi, since the project isn't doing anything terribly complex. The
requestslibrary seems significantly slower overall on ARM devices (I'm specifically singling outrequestssince regular curl requests are on par with non-ARM devices from my tests). When you saydo you mean request speed was fine in the past? Or has it always been slow?
@benbusby commented on GitHub (May 3, 2021):
Also going to update the issue title to make it easier for others to find in search
@accountForIssues commented on GitHub (May 4, 2021):
Damn I feel so stupid now. I know about the
env_fileusage in docker-compose but never made the connection in this case and didn't even try it. For some reason, I assumedwhoogle.envto be a just another config file. Anyways, nice to see it documented though :)I just updated my compose to include that and now the variables are correctly loaded. Fyi, the comments don't seem to affect anything.
Ever since I first started using whoogle (months ago), it has been working fast and fine. I was even surprised at how fast the autofill was but probably a week ago (maybe less), I started seeing that autofill was being slow and then the search started being very slow to just not being usable.
Also, I assume the
Tor hearbeatnotices in the log are normal even though I am not using Tor ? I always updated the docker images as soon as there was an update. Any change in theexperimentaltagged image that could have caused something like this ?@ghost commented on GitHub (May 5, 2021):
I installed
benbusby/whoogle-search0.4.1yesterday on 64bit Raspberry Pi 4B and it is not slow. It takes 1 second to get a result.@accountForIssues commented on GitHub (May 5, 2021):
@m4rkv5 My experience was the same as yours until it just slowed down for no apparent reason. Can you check the docker logs and confirm whether you can lines similar to the ones below ? Check the number of circuits.
@benbusby
Does the
experimentaltagged image enable and use tor by default even though it's not enabled inwhoogle.env?It's possible that the slowdown and name resolution errors are being caused by the tor network. It still doesn't explain why the problems started in the last week or so though (could just be my network).
Using whoogle with pip works with zero issues and I don't see anything related to Tor in the debug logs.
Further, I also have a heroku instance that also works without any issues. The logs there do have the
Tor heartbeatsbut with 0 circuits open.@benbusby commented on GitHub (May 5, 2021):
@accountForIssues glad the variables are loading correctly for you now!
That's interesting. There haven't been any changes to the core request functionality in a while -- at least not in the past few weeks. I'll be the first to admit that I'm skeptical of how reliable the
buildx-experimentaltag is these days. I routinely have to restart that build for random errors (unrelated to the project), but I'm not sure how/if that could be related to the slow request speed you're witnessing.Yes, those are normal.
@m4rkv5 thanks for commenting with your experience!
I have a few Raspberry Pi 2Bs that I use for testing running the app manually and with the
buildx-experimentaltag, and the slow request issue seems to pop up for me on rare occasions.At this point I'm not really sure of the best course of action. I'd rather not close the issue since the problem isn't necessarily resolved, but I'm also not sure how to debug further. I've been considering doing a full app refactor lately which could uncover some issue I haven't noticed, but otherwise I'm not sure what I can do to help.
@ghost commented on GitHub (May 9, 2021):
@accountForIssues My whoogle is running without tor. When I enable Tor i get this message
Error: "Tor query failed -- max attempts exceeded 10"I don't know how to setup Tor correctly.
@benbusby commented on GitHub (May 10, 2021):
@m4rkv5 that error you posted means that Tor is working correctly, but that Google is blocking the query for all of the exit nodes that were used. Whoogle only attempts to manually change exit nodes when a search is rejected, but this doesn't always guarantee a new identity.
@accountForIssues commented on GitHub (May 20, 2021):
@benbusby
I had stopped using whoogle on my pi since this issue but I decided to try it again. This time whoogle refused to even start, exiting at
Temporary failure in name resolutionerrors.I dug a little deeper and realized that all the docker containers on the pi weren't able to resolve dns but were connected to the internet. As most of my services are limited to the local network and/or use only IP addresses, I didn't notice anything wrong.
I, then, changed the dns the containers use at:
Now, all the containers can resolve dns and connect to internet fine. Whoogle is back to it's speedy self.
Previously, I had used the default which meant AdGuardHome/unbound installed on the same pi deployed using docker.
It has worked fine for months before I had this issue so most likely something changed either in docker or system packages for the OS (Arch Linux ARM) that caused this issue. I haven't tried to find out more about this but if I do, I'll update my post here. For now, everything is fine.
@benbusby commented on GitHub (May 20, 2021):
That's great to hear that things are working again! I hadn't considered that it could be a DNS issue, but looking back it seems pretty clear from the traceback you posted originally.
In any case, thanks for posting the solution. Closing for now, but feel free to keep this post updated with anything you find. If you come across anything that you think warrants adding to the project readme/wiki, let me know and I'll gladly do so.