PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
202 stars 231 forks source link

Large ensemble runs won't load in PEcAn web history - HTTP ERROR 500 #2026

Open serbinsh opened 5 years ago

serbinsh commented 5 years ago

Describe the bug If you run a large enough number of ensembles in PEcAn and attempt to view the history on the web the page won't load and will result in a "HTTP ERROR 500" error. A log snippet for example:

10.4.2.61 - - [03/Aug/2018:08:47:55 -0400] "GET /pecan_dev/historylist.php HTTP/1.1" 200 69945 "https://modex.bnl.gov/pecan_dev/history.php" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
10.4.2.61 - - [03/Aug/2018:08:48:00 -0400] "GET /pecan_dev/08-finished.php?workflowid=2000000964 HTTP/1.1" 500 - "https://modex.bnl.gov/pecan_dev/history.php" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"

and

[Fri Aug 03 08:52:10 2018] [error] [client 10.4.2.61] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /data/software/pecan_dev/web/08-finished.php on line 139, referer: https://modex.bnl.gov/pecan_dev/history.php

[Fri Aug 03 08:56:06 2018] [error] [client 10.4.2.61] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /data/software/pecan_dev/web/08-finished.php on line 139, referer: https://modex.bnl.gov/pecan_dev/history.php

https://modex.bnl.gov/pecan_dev/08-finished.php?workflowid=2000000964

Is this a modex issue or a general PEcAn issue? Is this an bug or a feature? Perhaps we don't want to load large ensembles?

To Reproduce Steps to reproduce the behavior:

  1. Run a large SIPNET esemble(e.g. E of 200+, and SA -3,-2,-1,0,1,2,3)
  2. Let the runs complete
  3. Got to history/results
  4. See error

Expected behavior Results page should open to view model results and outputs

Screenshots screen shot 2018-08-03 at 9 01 24 am

Machine (please complete the following information):

serbinsh commented 5 years ago

@robkooper bump....can we come up with a fix for this? Basically if you run a multi pft ensemble it may not be able to load in the history page

serbinsh commented 5 years ago

Some additional info:

https://stackoverflow.com/questions/561066/fatal-error-allowed-memory-size-of-134217728-bytes-exhausted-codeigniter-xml

https://stackoverflow.com/questions/36999406/allowed-memory-size-of-134217728-bytes-exhausted-tried-to-allocate-42-bytes?rq=1

Do we want to add/modify ini_set('memory_limit','16M'); in the history.php?

robkooper commented 5 years ago

setting up a run that is large enough to trigger this issue. I'd like to see if we can avoid this particular error. Maybe just need to move some loops in the php script.

robkooper commented 5 years ago

created a 300 ensemble run with SA -3,-2,-1,0,1,2,3 using docker setup This resulted in no problems.

added a simple file to my instance (both docker and ubuntu) that runs phpinfo() (remove this after testing is complete since it will show a lot of information) which showed a memory_limit of 128M.

serbinsh commented 5 years ago

@robkooper https://modex.bnl.gov/phpinfo.php

serbinsh commented 5 years ago

memory_limit | 128M | 128M

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 365 days with no activity.