virocon-organization / viroconweb

A software to compute environmental contours. Django web-application package.
MIT License
2 stars 1 forks source link

When the HDC's grid is selected too fine Heroku does not provide enough memory #142

Closed ahaselsteiner closed 6 years ago

ahaselsteiner commented 6 years ago

I'm submitting a ...

Expected behavior

How should it work (with the bug fixed or the feature implemented)? The user should only be allowed to start a computation with a certain limit of expected memory. He/she should not be allowed to start the computation otherwise. If nevertheless too much memory is used there should be a proper error message.

Screenshot

Actual behavior

How does it currently work (with the bug causing problems or without the feature)? The user can start the computation with an extremely fine grid and consequently the server will run out of memory.

Screenshot image

image

image

Steps to reproduce the problem (how to see the actual behavior)

  1. Select the Vanem2012 model for a HDC computation
  2. Use a small grid size (see screenshot)
  3. Get the 500 error
ahaselsteiner commented 6 years ago

Maybe this does not have to do with memory, but has another cause.

After setting DEBUG = true we get the following trace back: image

ahaselsteiner commented 6 years ago

We get the same error on local, so the cause for this error is not a time out.

ahaselsteiner commented 6 years ago

Solved by catching the ZeroDivisionError.

This is the result online with 0.2 0.2:

image

And this with 0.1 0.1:

image

As you can see the line combining the points is not plotted since alpha_shape causes an error.

ahaselsteiner commented 6 years ago

With 0.05 0.05 we get a time out error:

image

Consequently, this issue is solved. The error was not caused by too much memory, but by the ZeroDivisionError.

ahaselsteiner commented 6 years ago

Done and merged.