Stack level too deep #176

Closed
opened 2024-12-08 18:43:27 +00:00 by bustikiller · 0 comments
Owner

What

There is an error when the number of guests is too high. This is most likely due to the recursive implementation of the VNS algorithm

workers-1  | E, [2024-12-08T13:16:09.254273 #16] ERROR -- : [ActiveJob] [TableSimulatorJob] [0f6b05d7-bb98-4200-920c-a8025437cede] Error performing TableSimulatorJob (Job ID: 0f6b05d7-bb98-4200-920c-a8025437cede) from SolidQueue(default) in 42.99ms: SystemStackError (stack level too deep):
workers-1  | /usr/local/lib/ruby/3.3.0/set.rb:501:in `each_key'
workers-1  | /usr/local/lib/ruby/3.3.0/set.rb:501:in `each'
workers-1  | /rails/app/services/tables/discomfort_calculator.rb:39:in `map'
workers-1  | /rails/app/services/tables/discomfort_calculator.rb:39:in `cohesion_penalty'
workers-1  | /rails/app/services/tables/discomfort_calculator.rb:11:in `calculate'
workers-1  | /rails/app/services/tables/distribution.rb:67:in `local_discomfort'
workers-1  | /rails/app/services/tables/distribution.rb:26:in `block in discomfort'
workers-1  | /rails/app/services/tables/distribution.rb:25:in `map'
workers-1  | /rails/app/services/tables/distribution.rb:25:in `discomfort'
workers-1  | /rails/app/services/vns/engine.rb:42:in `block in optimize'
workers-1  | /rails/app/services/tables/shift.rb:19:in `block (2 levels) in each'
workers-1  | /usr/local/lib/ruby/3.3.0/set.rb:501:in `each_key'
workers-1  | /usr/local/lib/ruby/3.3.0/set.rb:501:in `each'
workers-1  | /rails/app/services/tables/shift.rb:12:in `block in each'
workers-1  | /rails/app/services/tables/shift.rb:11:in `permutation'
workers-1  | /rails/app/services/tables/shift.rb:11:in `each'
workers-1  | /rails/app/services/vns/engine.rb:41:in `optimize'
## What There is an error when the number of guests is too high. This is most likely due to the recursive implementation of the VNS algorithm ``` workers-1 | E, [2024-12-08T13:16:09.254273 #16] ERROR -- : [ActiveJob] [TableSimulatorJob] [0f6b05d7-bb98-4200-920c-a8025437cede] Error performing TableSimulatorJob (Job ID: 0f6b05d7-bb98-4200-920c-a8025437cede) from SolidQueue(default) in 42.99ms: SystemStackError (stack level too deep): workers-1 | /usr/local/lib/ruby/3.3.0/set.rb:501:in `each_key' workers-1 | /usr/local/lib/ruby/3.3.0/set.rb:501:in `each' workers-1 | /rails/app/services/tables/discomfort_calculator.rb:39:in `map' workers-1 | /rails/app/services/tables/discomfort_calculator.rb:39:in `cohesion_penalty' workers-1 | /rails/app/services/tables/discomfort_calculator.rb:11:in `calculate' workers-1 | /rails/app/services/tables/distribution.rb:67:in `local_discomfort' workers-1 | /rails/app/services/tables/distribution.rb:26:in `block in discomfort' workers-1 | /rails/app/services/tables/distribution.rb:25:in `map' workers-1 | /rails/app/services/tables/distribution.rb:25:in `discomfort' workers-1 | /rails/app/services/vns/engine.rb:42:in `block in optimize' workers-1 | /rails/app/services/tables/shift.rb:19:in `block (2 levels) in each' workers-1 | /usr/local/lib/ruby/3.3.0/set.rb:501:in `each_key' workers-1 | /usr/local/lib/ruby/3.3.0/set.rb:501:in `each' workers-1 | /rails/app/services/tables/shift.rb:12:in `block in each' workers-1 | /rails/app/services/tables/shift.rb:11:in `permutation' workers-1 | /rails/app/services/tables/shift.rb:11:in `each' workers-1 | /rails/app/services/vns/engine.rb:41:in `optimize' ```
bustikiller added reference main 2024-12-08 18:43:48 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bustikiller/wedding-planner#176
No description provided.