-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Hi,
wssserver generates extremely large responses (> 15MB) or even times out when filtering.
Steps to reproduce:
- Deploy latest version
- wait at least 24 hours, make sure you have 24 hours of data for a mobile station
- Filter on this station and select tail length: 6 hours or greater. If the query does not time out, it'll be extremely large. It basically contains hundreds of packet from related stations.
I located the source of the problem here: https://github.com/qvarforth/trackdirect/blob/main/server/trackdirect/websocket/responses/ResponseDataConverter.py#L304
related_station_packets contains more than one packet for each related station, causing all subsequent recursive calls to increase the list of packets.
I am currently testing a fix that filters down this list to the more recent packet for each station it seems to be working fine, but IMHO this does not address the root cause of the issue. Because even with this fix I get unrelated stations.
When filtering the related stations shall only contain the actual related stations.
For example F4FXL-9 was gated by F5ZEE. When filtering on 10 minutes and provided there is only one position in the 10 minutes I expect the response to contain:
- one packet for F4FXL-9
- one packet for F5ZEE
Actually the response contains the above packets plus an additional packet for DB0VKN-15 which is the gateway usually gating F5ZEE. DB0VKN was never ever involved in F4FXL-9 packets.
The same can be reproduced with older versions, so it is not a new bug.