BiologicalRecordsCentre / UKBMS-online

Issue tracking for UKBMS online recording site
2 stars 0 forks source link

My Sites page timing out #207

Closed IanMiddlebrook closed 3 years ago

IanMiddlebrook commented 3 years ago

Hi @DavidRoy

I have had several reports, and experienced myself, the 'My Sites' page takes a long time to load and often 'times out' with the message: The application did not respond in time.

This is particularly disconcerting when you've set up a new site, or edited a Site and clicked 'Finish', because it should take you back to My Sites. But when it times out recorders are not sure that their site details have saved.

Apparently the Branch sites page loads without any problem, so I'm not too sure what the difference is and why My Sites takes longer to find what it needs.

Thanks, Ian

DavidRoy commented 3 years ago

193 is the same issue

Gary-van-Breda commented 3 years ago

@BirenRathod : can you copy the latest version of the indicia-reports over to warehouse1 please? There is a new report "my_sites.xml" in the projects/ukbms directory.

BirenRathod commented 3 years ago

@Gary-van-Breda This report has gone live now.

Gary-van-Breda commented 3 years ago

@IanMiddlebrook : "My Sites" has been reconfigured to use the new report. Can you check that it is OK, and that the people who complained about the timeouts alos no longer have a problem?

IanMiddlebrook commented 3 years ago

Thanks @Gary-van-Breda It's nice and quick for me. I'll let you know what others say.

IanMiddlebrook commented 3 years ago

Hi @Gary-van-Breda I may have been a bit premature yesterday. This page still is still very inconsistent, and others are saying the same thing. Typically, if you've not visited the page for a while, it will time out on the first attempt, but then a simple refresh brings the page up in a matter of seconds. Seems strange as nobody has reported similar problems with the Branch Sites page.

Thanks, Ian

Gary-van-Breda commented 3 years ago

@IanMiddlebrook @DavidRoy There is a fundamental difference between the reports behind the branch sites and my sites pages: the my sites report has to do an extra JOIN on the occurrences table, as it returns a count of occurrences (and different taxa) on the site, which the Branch one does not (it only returns the number of walks). Do we need this extra information? Or would using same report on My Sites as the Branch Sites page by acceptable?
I think the problem stems from the way the server swaps data in and out of memory: if the occurrence data has not been read recently, then it has to be pulled in from the disc: a slow process. If the report is then run immediately afterwards, the data is now in memory and the speed is consequently a lot faster.

IanMiddlebrook commented 3 years ago

Hi @Gary-van-Breda @DavidRoy

As far as I'm concerned, the count of occurrences and species is not needed - just a bonus. I'd be quite happy just to have the number of samples (as per Branch sites) - especially if it means more reliable loading. If there were an efficient way to included number of species, then great, but not essential.

Thanks, Ian

DavidRoy commented 3 years ago

I agree. We should focus on the main function for this page

Gary-van-Breda commented 3 years ago

@IanMiddlebrook @DavidRoy : My Sites page now reconfigured to use the Branch Sites report.

IanMiddlebrook commented 3 years ago

Thanks @Gary-van-Breda