Skip to content

Very poor performance on specific request #51

@petrrr

Description

@petrrr

Some specific request take excessively long and are prone to timeouts. This behaviour is systematic and repeatable.

This issue originates from performance problems observed by service monitoring (oculus). Here the reference to the original issue: EIDA/etc#104 (private).

(Some preliminary information, we should complete)

The problem was observed fo the following query:

... but this is expected to apply for similar situations as well.

The time to response takes more than 5 minutes. We have been able to trace down that the time is spent mainly by the query to mongoDB. The response time could be significantly reduced by modifying the query, i.e. by changing the order of the query parameters. (TODO provide more detail!)

It is plausible that performance could also be improved if better usage of indexes is done.

petr@kozel ~ % wget "https://webservices.ingv.it/fdsnws/availability/1/query?network=IV&channel=HHE,HHZ&starttime=2009-03-06T00:01:00&endtime=2009-03-06T00:02:00"
--2025-11-05 09:55:14--  https://webservices.ingv.it/fdsnws/availability/1/query?network=IV&channel=HHE,HHZ&starttime=2009-03-06T00:01:00&endtime=2009-03-06T00:02:00
Resolving webservices.ingv.it (webservices.ingv.it)... 93.63.207.206
Connecting to webservices.ingv.it (webservices.ingv.it)|93.63.207.206|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2616 (2,6K) [text/plain]
Saving to: ‘query?network=IV&channel=HHE,HHZ&starttime=2009-03-06T00:01:00&endtime=2009-03-06T00:02:00’

query?network=IV&ch 100%[===================>]   2,55K  --.-KB/s    in 0s      

2025-11-05 10:00:37 (19,2 MB/s) - ‘query?network=IV&channel=HHE,HHZ&starttime=2009-03-06T00:01:00&endtime=2009-03-06T00:02:00’ saved [2616/2616]

corrisponding log:

[2025-11-05 09:00:37,546] INFO [data_access_layer.py:280] [get_output] Number of collected rows: 23
[2025-11-05 09:00:37,546] INFO [data_access_layer.py:293] [get_output] Final row number: 23
[2025-11-05 09:00:37,546] INFO [data_access_layer.py:303] [get_output] 2616 bytes rendered in 322.33 seconds.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions