NREL / openstudio-server-helm

Helm charts for Kubernetes deployment of OpenStudio Server.
Other
10 stars 10 forks source link

Mongo Memory default size #29

Closed tijcolem closed 2 years ago

tijcolem commented 2 years ago

On large runs with many analyses when viewing in the UI can hit the default Mongo memory limit. We'll want to make this default of 100M larger and user-defined in helm

app/views/analyses/_table.html.erb:112 app/views/analyses/show.html.erb:172 [22:40:13.056154 INFO] Started GET "/analyses/96562227-25e2-4e9a-b79c-5f3100f2f9c9" for 192.168.34.81 at 2021-10-21 22:40:13 +0000 [22:40:13.056776 INFO] Processing by AnalysesController#show as HTML [22:40:13.056808 INFO] Parameters: {"id"=>"96562227-25e2-4e9a-b79c-5f3100f2f9c9"} [22:40:13.066408 INFO] analyses_contoller.show enter [22:40:13.077340 INFO] search: , status: all, page: 1, view_all: 0 [22:40:13.077771 INFO] search: , status: completed, page: 1, view_all: 0 [22:40:13.078090 INFO] search: , status: started, page: 1, view_all: 0 [22:40:13.078383 INFO] search: , status: queued, page: 1, view_all: 0 [22:40:13.078673 INFO] search: , status: na, page: 1, view_all: 0 [22:40:13.079082 INFO] All: #, Completed: #, Started: #, Queued: #, N/A: # [22:40:13.079231 INFO] analyses_contoller.show leave [22:40:13.079603 DEBUG] Rendering layout layouts/application.html.erb [22:40:13.079660 DEBUG] Rendering analyses/show.html.erb within layouts/application [22:40:13.083426 INFO] analysis.status enter [22:40:13.085014 INFO] analysis.status enter [22:40:23.417171 DEBUG] Rendered analyses/_table.html.erb (Duration: 9170.3ms | Allocations: 1020221) [22:40:24.061531 DEBUG] Rendered analyses/_table.html.erb (Duration: 644.2ms | Allocations: 2589) [22:40:24.061620 INFO] Rendered analyses/show.html.erb within layouts/application (Duration: 10981.9ms | Allocations: 1036969) [22:40:24.061656 INFO] Rendered layout layouts/application.html.erb (Duration: 10982.0ms | Allocations: 1037008) [22:40:24.061759 INFO] Completed 500 Internal Server Error in 11005ms (MongoDB: 10.7ms | Allocations: 1049860) [22:40:24.062502 FATAL] ActionView::Template::Error (Executor error during find command :: caused by :: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in. (292) (on db:27017, modern retry, attempt 1)): 109: 110: 111: 112: <% simulations.each do |dp| %> 113: 114: <%= link_to "#{dp.name}", data_point_path(dp) %> 115: <%= dp.status %> Collapse

tijcolem commented 2 years ago

There doesn't appear to be a global option to define in this in the mongo config file (https://docs.mongodb.com/manual/reference/configuration-options/) to increase the memory limit for sorts that exceed the 100mb, however, you can pass on option client side {allow_disk_use: true} that should write to disk for these types of queries.

I think adding this to the server code, for e.g. https://github.com/NREL/OpenStudio-server/blob/develop/server/app/controllers/pages_controller.rb#L103-L104 should fix this.

tijcolem commented 2 years ago

closed via https://github.com/NREL/OpenStudio-server/issues/641