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

Add Timeout Environment Variable, Use Throughout, Up to 200s #3459

Merged
merged 3 commits into from
Jan 13, 2022

Conversation

rajadain
Copy link
Member

@rajadain rajadain commented Jan 13, 2022

Overview

We noticed that despite #3448 and WikiWatershed/mmw-geoprocessing#98, which fixed timeouts for the Schuylkill HUC-8 in development, we were still seeing timeouts on Staging. This could be because of multiple users requesting runs at the same time. This PR further ups that to 200s.

Updates to mmw-geoprocessing 5.2.0, which exposes environment variable overrides for certain settings. See WikiWatershed/mmw-geoprocessing#100.

Adds an MMW_GEOPROCESSING_TIMEOUT environment variable that is used in the mmw-geoprocessing service definition to set a timeout value of 200 seconds, up from the 120 baked in.

Also wires in that environment variable to be used for Celery, and the front-end, up from the 120 seconds as previously configured. Also updates messaging to be more appropriate.

Connects #3446

Testing Instructions

Since this was already working in development and not staging, the true test is on staging.

  • Checkout this PR run:
    MMW_SRAT_CATCHMENT_API_KEY=*** vagrant provision app worker
    
  • Run sub-basin on the Schuylkill HUC-8
    • Ensure it succeeds

With the latest version of the geoprocessing service, we can now
override certain settings with environment variables. We had set
the timeout to 160s in the last version, but that is not enough,
so we up it to 200s. In the future, we can set this simply by
setting this value, without needing a full re-deploy of the
geoprocessing service.
The new MMW_GEOPROCESSING_TIMEOUT variable is wired in to the
back-end and the front-end, so all the timeouts are now always
in sync, and can be changed from one central place.
Running Mapshed now takes longer because of the Hi Res streams.
Since running Mapshed for a large shape (~HUC-8), for multiple
shapes (sub-basin), and running multiple GWLF-Es all take a few
minutes, that messaging is consolidated.
@rajadain rajadain added the PA DEP Funding Source: Pennsylvania Department of Environment Protection label Jan 13, 2022
@rajadain rajadain self-assigned this Jan 13, 2022
@rajadain
Copy link
Member Author

With CI passing, in the interest of time, I'm going to merge this in.

@rajadain rajadain merged commit 3c5e314 into develop Jan 13, 2022
@rajadain rajadain deleted the tt/increase-timeout branch January 13, 2022 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PA DEP Funding Source: Pennsylvania Department of Environment Protection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant