hydroserver2 / hydroserver

Documentation and issue tracker for HydroServer and related applications
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

LRO Instance Testing - Backend #160

Closed daniel-slaugh closed 5 months ago

daniel-slaugh commented 6 months ago

I did some load testing on the LRO instance and found the following bugs:

kjlippold commented 6 months ago

I've been digging into the backend issues trying to optimize the DB queries. Currently I've got queries of one full datastream with 360,000 values taking 4 seconds, and it seems to be handling several concurrent queries without slowing down, other than the expected network bottlenecks and client memory limitations. Querying through the API is still taking a long time (20-60 seconds), so the bottleneck now seems to be somewhere in the application server.

I was seeing some out-of-memory errors associated with concurrent requests so I increased the EC2 instance from t3.micro to t3.small and that's helping with the out-of-memory errors. I'm still seeing 504 errors sometimes, so I'm going to continue doing some testing to try to identify what's still causing those.

We should probably give an option to display one or two years of data, and require the user to manually expand the date range beyond that instead of having an "All Time" button. Most clients will choke on multiple "All Time" datastreams even if we manage to speed up the requests, and we're at a point where most solutions involve spending more money on better servers rather than code optimizations. We don't want our client apps to fetch more data than the user needs, but right now I think most users will just click "All Time" if they need more than one month of data instead of entering a custom range.

kjlippold commented 5 months ago

PROXY_BASE_URL and photo issues were caused by a deployment bug for the LRO site. Both have been resolved.

Duplicate values issue has been resolved. https://github.com/hydroserver2/hydroserver-webapp-back/commit/2556cab76445c7f7406b1115c416625f2a72c3fa