Skip to content

Commit

Permalink
Merge pull request #122 from bird-house/fix-raven-timeout-while-proce…
Browse files Browse the repository at this point in the history
…ssing-requests

proxy: increase timeout since raven can take lots of time to process requests

Fix this timeout error in some Raven notebooks:
```
HTTPError: 504 Server Error: Gateway Time-out for url:
https://pavics.ouranos.ca/twitcher/ows/proxy/raven/wps
```

This is just a work-around since something is very wrong on our
production host Boreas (a physical host with 128G ram and 48 logical cpu).

During the test, Boreas was having this "load average: 6.35, 5.90,
4.33".  For its hardware specs, it is basically idle.

The increased timeout was not needed for my test VM (10G ram, 2 cpu),
medus.ouranos.ca (physical host with 16G ram, 16 logical cpu) and
hirondelle.crim.ca (VM with 32G ram, 8 cpu).

Should fix Ouranosinc/raven#362 and fix Ouranosinc/raven#357.

Ping @moulab88 to take a look at Boreas.  Just a wild guess, is it due for a reboot?

Ping @richardarsenault can you retry the 2 broken Raven notebooks?  I've already deployed this to prod.
  • Loading branch information
tlvu authored Feb 4, 2021
2 parents 085ff43 + 4a6b5a4 commit 3fcb760
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 37 deletions.
70 changes: 34 additions & 36 deletions birdhouse/README.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
.. contents::


Docker instructions
-------------------

Requirements:

* Centos 7 or Ubuntu Bionic (18.04), other distros untested.

*
Centos 7 or Ubuntu Bionic (18.04), other distros untested.

*
Hostname of Docker host must exist on the network. Must use bridge
* Hostname of Docker host must exist on the network. Must use bridge
networking if Docker host is a Virtual Machine.

*
User running ``pavics-compose.sh`` below must not be ``root`` but a regular user
* User running ``pavics-compose.sh`` below must not be ``root`` but a regular user
belonging to the ``docker`` group.

*
Install latest docker-ce and docker-compose for the chosen distro (not the
* Install latest docker-ce and docker-compose for the chosen distro (not the
version from the distro).

To run ``docker-compose`` for PAVICS, the `pavics-compose.sh <pavics-compose.sh>`_ (:download:`download </birdhouse/pavics-compose.sh>`) wrapper script must be used.
Expand Down Expand Up @@ -67,31 +65,33 @@ To launch all the containers, use the following command:
If you get a ``'No applicable error code, please check error log'`` error from the WPS processes, please make sure that the WPS databases exists in the
postgres instance. See `create-wps-pgsql-databases.sh <scripts/create-wps-pgsql-databases.sh>`_ (:download:`download </birdhouse/scripts/create-wps-pgsql-databases.sh>`).


Note
----

* All WPS requests should be completed within ``proxy_read_timeout`` of the
Nginx proxy, see `nginx.conf`_ (:download:`download <birdhouse/config/proxy/nginx.conf>`).
Any WPS requests that will take longer should use the async mode.


Manual steps post deployment
----------------------------

Change geoserver default admin password
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


*
Go to
* Go to
``https://<PAVICS_FQDN>/geoserver/web/wicket/bookmarkable/org.geoserver.security.web.UserGroupRoleServicesPage`` (Security -> Users, Groups, and Roles)

*
Login using the default username ``admin`` and default password ``geoserver``.
* Login using the default username ``admin`` and default password ``geoserver``.

*
Click on tab "Users/Groups".
* Click on tab "Users/Groups".

*
Click on user "admin".
* Click on user "admin".

*
Change the password.
* Change the password.

*
Click "Save".
* Click "Save".

Create public demo user in Magpie for JupyterHub login
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -111,23 +111,19 @@ instructions below.
Manual instructions:

*
Go to
* Go to
``https://<PAVICS_FQDN>/magpie/ui/login`` and login with the ``admin`` user. The password should be in ``env.local``.

*
Then go to ``https://<PAVICS_FQDN>/magpie/ui/users/add``.
* Then go to ``https://<PAVICS_FQDN>/magpie/ui/users/add``.

*
Fill in:
* Fill in:

* User name: <value of JUPYTER_DEMO_USER in ``env.local``\ >
* Email: < anything is fine >
* Password: < you decide >
* User group: ``anonymous``

*
Click "Add User".
* Click "Add User".

Optional: prepare instance to run automated end-to-end test suite
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -154,6 +150,7 @@ The canarie monitoring link
instance is ready to run the automated end-to-end test suite. That link should
return the HTTP response code ``200``.


Vagrant instructions
--------------------

Expand Down Expand Up @@ -215,6 +212,7 @@ Starting and managing the lifecycle of the VM:
# not needed normally during tight development loop
vagrant provision
Tagging policy
--------------

Expand All @@ -227,19 +225,19 @@ together. So we need a slight modification to the definition of the standard.
Given a version number MAJOR.MINOR.PATCH, increment the:


#.
MAJOR version when the API or user facing UI changes that requires
#. MAJOR version when the API or user facing UI changes that requires
significant documentation update and/or re-training of the users. Also
valid when a big milestone has been reached (ex: DACCS is released).

#.
MINOR version when we add new components or update existing components
#. MINOR version when we add new components or update existing components
that also require change to other existing components (ex: new Magpie that
also force Twitcher and/or Frontend update) or the change to the existing
component is a major one (ex: major refactoring of Twitcher, big merge
with corresponding upstream component from birdhouse project).

#.
PATCH version when we update existing components without impact on other
#. PATCH version when we update existing components without impact on other
existing components and the change is a minor change for the existing
component.


.. _nginx.conf: ./config/proxy/nginx.conf
2 changes: 1 addition & 1 deletion birdhouse/config/proxy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ http {
client_body_timeout 600s;

# timeout for reading a response from the proxied server
proxy_read_timeout 120s; # default 60s
proxy_read_timeout 240s; # default 60s

include /etc/nginx/conf.d/*.conf;

Expand Down

0 comments on commit 3fcb760

Please sign in to comment.