Any Control Over Please Wait A Bit Before Searching Again — an archived discussion from the APG vNext support community.
About This Topic
This thread covers any control over please wait a bit before searching again in the context of APG vNext, the ASP.NET forum and community platform. The community includes APG developers and experienced administrators who can help with similar questions.
APG vNext Support
- Knowledge Base — documented solutions
- FAQ — frequently asked questions
- Installation Guide
- Upgrade Guide
- Support Forum
Controlling the "Please Wait Before Searching Again" Rate Limit in APG vNext
APG vNext enforces a search cooldown to prevent database overload from rapid repeated queries — particularly from bots or members accidentally triggering the search form multiple times. The "Please wait a bit before searching again" message appears when a user submits a new search before the cooldown window has elapsed. This guide explains how to adjust or disable the limit and how to implement smarter throttling that targets bots rather than legitimate users.
Default Search Throttle Settings
The default APG vNext search throttle is configured in web.config. The key settings are:
<appSettings>
<!-- Minimum seconds between searches per user session -->
<add key="APG.Search.ThrottleSeconds" value="15" />
<!-- Apply throttle to guests only (true), or all users -->
<add key="APG.Search.ThrottleGuestsOnly" value="false" />
<!-- Disable throttle entirely (not recommended) -->
<add key="APG.Search.ThrottleEnabled" value="true" />
</appSettings>
Reducing ThrottleSeconds to 5–8 seconds is usually sufficient for normal use while still protecting against bot abuse. Setting it to 0 effectively disables the throttle.
Applying the Throttle Only to Guests
The most user-friendly configuration throttles guest searches (bots and anonymous visitors) while allowing logged-in members to search freely:
<add key="APG.Search.ThrottleGuestsOnly" value="true" />
<add key="APG.Search.ThrottleSeconds" value="20" />
This protects the database from crawler-generated search load without frustrating your registered community members.
Advanced: Rate Limiting via IIS Dynamic IP Restrictions
For high-traffic forums where the built-in throttle is insufficient, supplement it with IIS-level rate limiting on the search endpoint:
<!-- IIS web.config — rate limit /community/search -->
<location path="community/search">
<system.webServer>
<security>
<dynamicIpSecurity>
<denyByConcurrentRequests enabled="true" maxConcurrentRequests="3" />
<denyByRequestRate enabled="true"
maxRequests="10"
requestIntervalInMilliseconds="5000" />
</dynamicIpSecurity>
</security>
</system.webServer>
</location>
This blocks any IP that makes more than 10 search requests in 5 seconds — well above human typing speed, but effective against automated scrapers.
Improving the Error Message UX
The default throttle message is abrupt. Customise it in the language file (APGLang.en.xml):
<string name="SearchThrottle">
To keep the forum fast for everyone, please wait a few seconds before searching again.
</string>
Per-Member Search Throttle Based on Trust Level
A more sophisticated approach than a flat time-based throttle is to apply different throttle settings based on the member's trust level. New members (who may be bots that passed registration) get a strict throttle; established members with a track record get a more relaxed limit:
<!-- Apply different throttle based on post count -->
<add key="APG.Search.ThrottleNewMemberPosts" value="10" />
<!-- Members with <10 posts: throttle at 30 seconds -->
<add key="APG.Search.ThrottleNewMemberSeconds" value="30" />
<!-- Members with 10+ posts: throttle at 5 seconds -->
<add key="APG.Search.ThrottleTrustedSeconds" value="5" />
<!-- Members with 100+ posts: no throttle -->
<add key="APG.Search.ThrottleSeniorMemberPosts" value="100" />
<add key="APG.Search.ThrottleSeniorMemberSeconds" value="0" />
Monitoring Search Load on the Database
Before adjusting throttle settings, check the actual impact of search queries on your SQL Server. If searches are completing in under 100ms, the current throttle may be overly aggressive:
-- Monitor search query performance:
SELECT TOP 20
qs.execution_count,
qs.total_elapsed_time / qs.execution_count AS avg_elapsed_us,
qs.total_worker_time / qs.execution_count AS avg_cpu_us,
SUBSTRING(st.text, (qs.statement_start_offset/2)+1,
((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(st.text)
ELSE qs.statement_end_offset END - qs.statement_start_offset)/2)+1) AS statement_text
FROM sys.dm_exec_query_stats qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
WHERE st.text LIKE '%CONTAINS%'
OR st.text LIKE '%apg_Posts%'
ORDER BY qs.total_worker_time DESC;
If average search query time is under 50ms, reducing the throttle from 15 to 5 seconds is safe. If queries take 200ms+, consider adding a Full-Text Search covering index before reducing the throttle.
Full-Text Search Performance Tuning
The "please wait before searching" throttle is a band-aid over slow search queries. The root cause is usually a Full-Text index that needs maintenance. Run a population status check and rebuild if needed:
-- Check FTS catalog status:
SELECT name, FULLTEXTCATALOGPROPERTY(name, 'PopulateStatus') AS status
FROM sys.fulltext_catalogs;
-- 0 = idle (healthy), 1 = populating (still indexing), 5 = error
-- If status shows error or the catalog hasn't been rebuilt recently:
ALTER FULLTEXT CATALOG APGFullTextCatalog REBUILD;
-- Check when the catalog was last populated:
SELECT FULLTEXTCATALOGPROPERTY('APGFullTextCatalog', 'IndexSize') AS IndexSizeMB,
FULLTEXTCATALOGPROPERTY('APGFullTextCatalog', 'PopulateCompletionAge') AS SecondsSinceLastBuild;
Communicating Throttle Limits to Members
When the throttle triggers, the default error message "Please wait a bit before searching again" is vague. Improving it reduces frustration for legitimate users who hit the limit accidentally. Customise the message in the APG vNext language file to be specific and helpful: include the wait time and suggest using the site's alternative navigation (browsing categories directly) while waiting for the throttle to reset. A clear, informative message is less likely to drive members away from the forum after a search throttle event.
Related Resources
Looking for more help? Browse the support forum or check the Knowledge Base.