<div dir="ltr">Because we're behind a firewall, all the addresses display as 127.0.0.1. I can talk to the people who administer the firewall though about blocking IP's. Thanks<div>-Jon</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 30, 2021 at 8:20 PM Jason Stephenson via Evergreen-general <<a href="mailto:evergreen-general@list.evergreen-ils.org">evergreen-general@list.evergreen-ils.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">JonGeorg,<br>
<br>
Check your Apache logs for the source IP addresses. If you can't find <br>
them, I can share the correct configuration for Apache with Nginx so <br>
that you will get the addresses logged.<br>
<br>
Once you know the IP address ranges, block them. If you have a firewall, <br>
I suggest you block them there. If not, you can block them in Nginx or <br>
in your load balancer configuration if you have one and it allows that.<br>
<br>
You may think you want your catalog to show up in search engines, but <br>
bad bots will lie about who they are. All you can do with misbehaving <br>
bots is to block them.<br>
<br>
HtH,<br>
Jason<br>
<br>
On 11/30/21 9:34 PM, JonGeorg SageLibrary via Evergreen-general wrote:<br>
> Question. We've been getting hammered by search engine bots [?], but <br>
> they seem to all query our system at the same time. Enough that it's <br>
> crashing the app servers. We have a robots.txt file in place. I've <br>
> increased the crawling delay speed from 3 to 10 seconds, and have <br>
> explicitly disallowed the specific bots, but I've seen no change from <br>
> the worst offenders - Bingbot and UT-Dorkbot. We had over 4k hits from <br>
> Dorkbot alone from 2pm-5pm today, and over 5k from Bingbot in the same <br>
> timeframe. All a couple hours after I made the changes to the robots <br>
> file and restarted apache services. Which out of 100k entries in the <br>
> vhosts files in that time frame doesn't sound like a lot, but the rest <br>
> of the traffic looks normal. This issue has been happening <br>
> intermittently [last 3 are 11/30, 11/3, 7/20] for a while, and the only <br>
> thing that seems to work is to manually kill the services on the DB <br>
> servers and restart services on the application servers.<br>
> <br>
> The symptom is an immediate spike in the Database CPU load. I start <br>
> killing all queries older than 2 minutes, but it still usually <br>
> overwhelms the system causing the app servers to stop serving requests. <br>
> The stuck queries are almost always ones along the lines of:<br>
> <br>
> -- bib search: #CD_documentLength #CD_meanHarmonic #CD_uniqueWords <br>
> from_metarecord(*/BIB_RECORD#/*) core_limit(100000) <br>
> badge_orgs(1,138,151) estimation_strategy(inclusion) skip_check(0) <br>
> check_limit(1000) sort(1) filter_group_entry(1) 1 <br>
> site(*/LIBRARY_BRANCH/*) depth(2) <br>
> +<br>
> | | WITH w AS (<br>
> | | WITH */STRING/*_keyword_xq AS (SELECT <br>
> +<br>
> | | (to_tsquery('english_nostop', <br>
> COALESCE(NULLIF( '(' || <br>
> btrim(regexp_replace(split_date_range(search_normalize(replace(replace(uppercase(translate_isbn1013(E'1')), <br>
> */LONG_STRING/*))),E'(?:\\s+|:)','&','g'),'&|') || ')', '()'), '')) || <br>
> to_tsquery('simple', COALESCE(NULLIF( '(' || <br>
> btrim(regexp_replace(split_date_range(search_normalize(replace(replace(uppercase(translate_isbn1013(E'1')), <br>
> */LONG_STRING/*))),E'(?:\\s+|:)','&','g'),'&|') || ')', '()'), ''))) AS <br>
> tsq,+<br>
> | | (to_tsquery('english_nostop', <br>
> COALESCE(NULLIF( '(' || <br>
> btrim(regexp_replace(split_date_range(search_normalize<br>
> 00:02:17.319491 | */STRING/* |<br>
> <br>
> And the queries by DorkBot look like they could be starting the query <br>
> since it's using the basket function in the OPAC.<br>
> <br>
> "GET <br>
> /eg/opac/results?do_basket_action=Go&query=1&detail_record_view=*/LONG_STRING/*&search-submit-go=Search&no_highlight=1&modifier=metabib&select_basket_action=1&qtype=keyword&fg%3Amat_format=1&locg=112&sort=1 <br>
> HTTP/1.0" 500 16796 "-" "UT-Dorkbot/1.0"<br>
> <br>
> I've anonymized the output just to be cautious. Reports are run off the <br>
> backup database server, so it cannot be an auto generated report, and it <br>
> doesn't happen often enough for that either. At this point I'm tempted <br>
> to block the IP addresses. What strategies are you all using to deal <br>
> with crawlers, and does anyone have an idea what is causing this?<br>
> -Jon<br>
> <br>
> _______________________________________________<br>
> Evergreen-general mailing list<br>
> <a href="mailto:Evergreen-general@list.evergreen-ils.org" target="_blank">Evergreen-general@list.evergreen-ils.org</a><br>
> <a href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general" rel="noreferrer" target="_blank">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a><br>
> <br>
_______________________________________________<br>
Evergreen-general mailing list<br>
<a href="mailto:Evergreen-general@list.evergreen-ils.org" target="_blank">Evergreen-general@list.evergreen-ils.org</a><br>
<a href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general" rel="noreferrer" target="_blank">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a><br>
</blockquote></div>