Skip to content

[Bug]: Timeseries request times out when unit(s) parameter specified #1901

Description

@msweier

Describe the bug

When the unit or units parameter is specified as a unit like ft the request times out with a 408 error. This was discovered by using shefParser which uses these type requests a lot.

Expected behavior

It should return the data in the requested units.

To Reproduce

In test GET /cwms-data/timeseries?office=MVP&name=Baldhill_Dam.Elev.Inst.15Minutes.0.rev-NGVD29&unit=ft will eventually timeout with a 408.

GET /cwms-data/timeseries?office=MVP&name=Baldhill_Dam.Elev.Inst.15Minutes.0.rev-NGVD29 returns as expected.

Priority

High

Logs/Incident Identifier

ERROR: CDA Error: response=<Response [408]>
WARNING: Skipping time series [Baldhill_Dam.Elev.Inst.15Minutes.0.rev-NGVD29]: error fetching from CDA: CWMS API Error (CDA_SERVER/mvp-data/timeseries?office=MVP&name=Baldhill_Dam.Elev.Inst.15Minutes.0.rev-NGVD29&unit=ft&begin=2026-08-24T11%3A37%3A03.091932&end=2026-08-26T11%3A37%3A03.091932&page-size=300000&trim=True). {"message":"Request is taking too long; try narrowing the date range.","incidentIdentifier":"c8552fee-d73e-4573-b7ba-3147d4c53463","source":"Unknown","details":{}}
(CDA_SERVER/mvp-data/timeseries?office=MVP&name=Baldhill_Dam.Elev.Inst.15Minutes.0.rev-NGVD29&unit=ft&begin=2026-08-24T11%3A37%3A03.091932&end=2026-08-26T11%3A37%3A03.091932&page-size=300000&trim=TrueERROR: CDA Error: response=<Response [408]>

CURL Commands

CDA Version

2026.08.14-testa

Additional context

GPT 5.4 suggests the fix is to keep direct-read, but change the unit handling:

  • Treat unit/units as response units, not storage-row filters.
  • Resolve EN/SI to a concrete response unit as CDA already does.
  • Validate only that native unit -> requested unit is convertible.
  • Fetch rows in the series native/source unit.
  • Convert VALUE to the requested response unit during query or immediately after fetch.
  • Keep the response metadata units field set to the requested unit.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions