https://bz.apache.org/bugzilla/show_bug.cgi?id=70193
Bug ID: 70193
Summary: Redis timeouts using the wrong unit
Product: Apache httpd-2
Version: 2.4.68
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_socache_redis
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
The mod_socache_redis module calls apr_redis_server_create with a timeout in
microseconds, but this function expects seconds, performing its own conversion
to microseconds.
Because of this, any rwto (read-write timeout) gets upconverted twice, and even
a tiny timeout becomes enormous, making it unusable. The smallest unit
configurable is 1ms, so there is effectively no timeout.
Verified on Debian Trixie, apache2-bin 2.4.68-1~deb13u1 and libaprutil1t64
1.6.3-3+deb13u1, and checked against trunk.
I believe an easy fix would be to make apr_redis_server_create accept
microseconds instead (apr_uint32_t should still be enough to cover a full
hour). Assuming mod_socache_redis is its only caller (perhaps a bit
optimistic?), this makes for an ABI-compatible fix, albeit with a changed
contract, that doesn't require rounding timeouts to whole integers.
Alternatively, we could just do the integer rounding on the calling side, for a
fully compatible fix with the downside of only supporting second-granularity
timeout values.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]