unige-geohealth / accessmod

accessmod 5 : anisotropic accessibility analysis.
GNU Lesser General Public License v3.0
42 stars 14 forks source link

.OVA file on AWS #407

Closed mohbadar closed 1 year ago

mohbadar commented 1 year ago

Current Situation

I have downloaded and imported .ova file to AWS and created an instance. I want to access the AccessMod on port 8080. However, it is not working.

Expected Behavior

I need to access the user interface by the AWS public IP.

Detailed Description

Can you anyone help me to solve this issue?

mohbadar commented 1 year ago

Solved

fxi commented 1 year ago

Great.

For better performance, you may want to create an instance of AccessMod using docker container directly on ECS, as ".ova" adds a virtualisation overhead.

Comparison of local / cloud based instances: issue https://github.com/unige-geohealth/accessmod/issues/360 ( vbox = ova)

Note that even though AccessMod can be run as a web service, it is still single user based. It's like running a local QGIS instance, but on the cloud. It should not serve multiple users at once.

mohbadar commented 1 year ago

Many thanks for your reply.

For the time being, I have create AMI out the AccessMod .ova file and it works fine.

There is an issue with timeout of response time. For instance, when the number of health facilities are over 2700 , the system is re-attempting connection and finally I have reload.

I increased the shiny_server timeout but it didn't work.

Configuration file:


# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;

# Define a server that listens on port 3838
server {
  listen 3838;

  # Define a location at the base URL
  location / {

    # Host the directory of Shiny Apps stored in this directory
    site_dir /srv/shiny-server;

    # Log all Shiny output to files in this directory
    log_dir /var/log/shiny-server;

    # When a user visits the base URL rather than a particular application,
    # an index of the applications available in this directory will be shown.

    directory_index on;

  # Increase the timeout of the app
    app_init_timeout 9999999999;
    app_idle_timeout 9999999999;

  }
}

* Have you ever faced this issue or do you know solution for this?

fxi commented 1 year ago

Thanks.

Note that a "reload" issue maybe related to a non-catched bug, not necessarily related to a timeout.

If you are using the latest 5.6.* version, it should be stable, but there are plenty of improvements since then. Comparing to the latest 5.8.0 :

 448 files changed, 41666 insertions(+), 16098 deletions(-)

In any case, the GUI version of AccessMod has a limitation for long-lasting computations : it requires a browser tab to be kept open. If the browser's host is shut down - even if the remote server is still up – the app will stop between iterations or at the end of the last process.

With the latest versions, AccessMod 5 does not rely on a web session to be run : it can be run with some command lines.

mohbadar commented 1 year ago

Thanks,

Version: 5.6.56

I cannot maintain a long-lasting browser tab to be kept open. So, I want to run this analysis as a background operation. How can I do that with command line? Or any asynchronous API to do it?

Please also find the attached log file. am5_export_table_logsTable_2022-11-24 (1).csv

fxi commented 1 year ago

Thanks for sharing the log file.

The current way of handling large / non trivial analysis is to use the "replay" mode. "Replay" because it's a way to run again a previously computed analysis with new parameters. E.g. more facilities, different scenarios. > v.5.7.6

Example :

Simplified workflow is :

graph TD;
    A[Import] ==> B[configure] ==> C[compute] ==> D[export project] ==> E[run replay]
    D ==> F[export config] ==> E
    B --> | Save config without computing | D
    F -->  | optional edit | E

It's used by our team, but it's not yet publicly released / promoted.

mohbadar commented 1 year ago

Thank you @fxi,

Is it possible to organize a call to assist me? I have tried the replay mode, however, it didn't work for me.

carlosrochoa commented 1 year ago

Hello @mohbadar, I added myself as partial support for this issue. We are in the process of writing the information support for the Replay functionality and its use with the latest version of AM. We could share you this information when it becomes available in the next few days, so you can test the functionality. Hopefully this will facilitate your analysis.