Fix Image Proxy 'TCP Timeout' Error #107
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will fix issue #106. The changes are as follows:
Inside of
config/config.go
:Disable
IPV6
due to it not working correctly with most image-based search engines.Change
RequestTimeout
to something higher to prevent timeouts. Does not change responsiveness of image searches.Enable
FollowRedirect
. There were some rare cases where having it disabled caused issues with loading images.Inside of
morty.go
:Add
MaxConnsPerHost: 4
. This will limit connections per host to 4. Images still load quickly.Change
time.Second
totime.Minute
. This adds far more time for an image to load and causes less timeouts.This should fix most issues with timeouts from image-based search engines. Through my testing so far, I have found that at most one image will timeout from a search even after loading 5+ pages of images. This could be higher in some cases as I haven't tested more than a few days but should generally be small enough to not bother the user.
Unsure if this is required or not but I have changed the following settings in
/etc/searx/settings.yml
as well just to make sure that the hosts configuration is the same. Unsure if this changes anything so please do let me know.Changes should work without any other configuration.