DIYgod/RSSHub · warning · RequestInProgressError
Another request is in progress, please try again later.
Error message
Another request is in progress, please try again later.
What it means
Thrown by the WeChat data258 route handler at entry when a cache-based lock (`data258:lock`) is set to `'1'`, indicating another request is already in progress. This is a `RequestInProgressError`, which RSSHub maps to an HTTP 503-style response advising the client to retry. The lock exists because the route uses anti-anti-crawler workarounds (rate-limited sequential requests with 1s delays) that break if concurrent requests interfere.
Source
Thrown at lib/routes/wechat/data258.ts:56
{
source: ['mp.data258.com/', 'mp.data258.com/article/category/:id'],
},
],
name: '公众号(微阅读来源)',
maintainers: ['Rongronggg9'],
handler,
url: 'mp.data258.com/',
description: `::: warning
由于使用了一些针对反爬的缓解措施,本路由响应较慢。默认只抓取前 5 条,可通过 \`?limit=\` 改变(不推荐,容易被反爬)。
该网站使用 IP 甄别访客,且应用严格的每日阅读量限额(约 15 次),请自建并确保正确配置缓存;如使用内存缓存而非 Redis 缓存,请增大缓存容量。该限额足够订阅至少 3 个公众号(假设公众号每日仅更新一次);首页 / 分类页更新相当频繁,不推荐订阅。
:::`,
};
async function handler(ctx) {
// !!! here we must use a lock to prevent other requests to break the anti-anti-crawler workarounds !!!
if ((await cache.get('data258:lock', false)) === '1') {
throw new RequestInProgressError('Another request is in progress, please try again later.');
}
// !!! here no need to acquire the lock, because the MP/category page has no crawler detection !!!
const id = ctx.req.param('id');
const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 5;
const rootUrl = 'https://mp.data258.com';
const pageUrl = id ? `${rootUrl}/article/category/${id}` : rootUrl;
const response = await got(pageUrl);
const $ = load(response.data);
const title = $('head title').text();
// title = title.endsWith('-微阅读') ? title.slice(0, title.length - 4) : title;
const description = $('meta[name="description"]').attr('content');
const categoryPage = $('ul.fly-list');View on GitHub (pinned to bed535e087)
Solutions
- Wait and retry after a short delay (the lock auto-expires in 60 seconds).
- Reduce polling frequency in your RSS reader to avoid overlapping requests.
- Self-host RSSHub with Redis cache (not memory cache) and increase cache capacity as recommended in the route description.
- Subscribe to fewer data258 accounts simultaneously — the daily read limit is ~15 requests shared across all accounts.
Defensive patterns
Strategy: retry
Try / catch
// RSS readers should treat 503/RequestInProgressError as retryable
try {
const feed = await fetchRss('/wechat/data258/' + id);
} catch (e) {
if (e.name === 'RequestInProgressError') {
// Retry after a delay (e.g. 60s) — the lock auto-expires
await sleep(60000);
return fetchRss('/wechat/data258/' + id);
}
throw e;
} Prevention
- Reduce RSS reader polling frequency for data258 feeds to avoid concurrent requests.
- Self-host RSSHub with Redis cache (not memory) for reliable lock behavior across restarts.
- Subscribe to at most 3 data258 accounts per instance given the ~15 daily request limit.
- Set a longer cache TTL in RSSHub config to reduce upstream request frequency.
When it happens
Trigger: Two or more requests to `/wechat/data258/:id` arrive while a previous request is still crawling article jump links. The first request acquires the lock (line 93, set for 60 seconds); subsequent requests hit this guard at line 55 and get rejected. Also fires if a previous request crashed without releasing the lock (the lock auto-expires after 60s).
Common situations: An RSS reader polls the feed frequently while a previous crawl is still running (the route is intentionally slow due to 1s-per-item delays). Multiple subscriptions to different data258 accounts on the same RSSHub instance contend for the single global lock. A crashed request leaves a stale lock that blocks requests for up to 60 seconds.
Related errors
- 对应 uid 的 Bilibili 用户 请求失败
- 该公众号不存在,有关如何获取公众号 id,详见 https://docs.rsshub.app/routes/new-m
- message ?? code
- response.message ?? `Error code ${response.code}`
- response.message ?? `Error code ${response.code}`
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/71ed4af48faadea6.
Report an issue: GitHub.