Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make downloads more efficient #340

Open
jspijker opened this issue Apr 2, 2024 · 5 comments
Open

Make downloads more efficient #340

jspijker opened this issue Apr 2, 2024 · 5 comments
Assignees

Comments

@jspijker
Copy link
Collaborator

jspijker commented Apr 2, 2024

In current setup, multiple instances of the application might download the same data. Create some sort of communication between processes. Prevent blocking of data requests due to crashed downloads

here: {https://github.com/rivm-syso/Analyse-Together/blob/79f9ff9f0a6cb07a41b1eb505622bfb324b344b9/scripts/queue_manager.R#L83C3-L84C75)

@jspijker jspijker added the enhancement New feature or request label Apr 2, 2024
@jspijker jspijker self-assigned this Apr 2, 2024
@jspijker
Copy link
Collaborator Author

jspijker commented Aug 5, 2024

This is hard to prevent since equal station/range combo's are allowed in the queue. Simple solution is to randomize the station list to lower the change that the same station/range is downloaded twice.

@jspijker jspijker removed the enhancement New feature or request label Aug 5, 2024
@jspijker
Copy link
Collaborator Author

jspijker commented Aug 7, 2024

The following error may be related to this:

Error in ATdatabase::add_doc(type = "data_req_done", ref = job_id, doc = j_done,  : 
  Error add_doc: doc exists and overwrite is FALSE

@jspijker
Copy link
Collaborator Author

This is only relevant for LML/KNMI stations, since they can occur multiple times in a data request. Individual sensors should by unique. This can be optimised to get all LML/KNMI stations from within a data req first, and then the sensors.

LML and KNMI station are also downloaded individually, but doesn't work because the dl_station function is aimed at sensors, hence resulting in empty streams.

@jspijker
Copy link
Collaborator Author

again error: Happens when on heavy load.

Listening on http://0.0.0.0:3838
Error in ATdatabase::add_doc(type = "data_req_done", ref = job_id, doc = j_done, :
Error add_doc: doc exists and overwrite is FALSE
Execution halted

@jspijker
Copy link
Collaborator Author

Implement the solution of #392 into the dev branch, add it to the queue_manager and make it independent of the app

jspijker added a commit that referenced this issue Oct 28, 2024
Also added a prefix to log messages from queue_manager with hostname and
PID.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant