{"record":{"id":"71ed4af48faadea6","repo":"DIYgod/RSSHub","slug":"another-request-is-in-progress-please-try-again-l","errorCode":null,"errorMessage":"Another request is in progress, please try again later.","messagePattern":"Another request is in progress, please try again later\\.","errorType":"exception","errorClass":"RequestInProgressError","httpStatus":null,"severity":"warning","filePath":"lib/routes/wechat/data258.ts","lineNumber":56,"sourceCode":"        {\n            source: ['mp.data258.com/', 'mp.data258.com/article/category/:id'],\n        },\n    ],\n    name: '公众号（微阅读来源）',\n    maintainers: ['Rongronggg9'],\n    handler,\n    url: 'mp.data258.com/',\n    description: `::: warning\n由于使用了一些针对反爬的缓解措施，本路由响应较慢。默认只抓取前 5 条，可通过 \\`?limit=\\` 改变（不推荐，容易被反爬）。\n\n该网站使用 IP 甄别访客，且应用严格的每日阅读量限额（约 15 次），请自建并确保正确配置缓存；如使用内存缓存而非 Redis 缓存，请增大缓存容量。该限额足够订阅至少 3 个公众号（假设公众号每日仅更新一次）；首页 / 分类页更新相当频繁，不推荐订阅。\n:::`,\n};\n\nasync function handler(ctx) {\n    // !!! here we must use a lock to prevent other requests to break the anti-anti-crawler workarounds !!!\n    if ((await cache.get('data258:lock', false)) === '1') {\n        throw new RequestInProgressError('Another request is in progress, please try again later.');\n    }\n    // !!! here no need to acquire the lock, because the MP/category page has no crawler detection !!!\n\n    const id = ctx.req.param('id');\n\n    const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 5;\n\n    const rootUrl = 'https://mp.data258.com';\n    const pageUrl = id ? `${rootUrl}/article/category/${id}` : rootUrl;\n\n    const response = await got(pageUrl);\n    const $ = load(response.data);\n\n    const title = $('head title').text();\n    // title = title.endsWith('-微阅读') ? title.slice(0, title.length - 4) : title;\n    const description = $('meta[name=\"description\"]').attr('content');\n\n    const categoryPage = $('ul.fly-list');","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/wechat/data258.ts#L38-L74","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// RSS readers should treat 503/RequestInProgressError as retryable\ntry {\n    const feed = await fetchRss('/wechat/data258/' + id);\n} catch (e) {\n    if (e.name === 'RequestInProgressError') {\n        // Retry after a delay (e.g. 60s) — the lock auto-expires\n        await sleep(60000);\n        return fetchRss('/wechat/data258/' + id);\n    }\n    throw e;\n}","preventionTips":["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."],"tags":["rate-limiting","anti-crawler","concurrency-lock","wechat","rss-route","retryable"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}