performance - rails runner background aws sqs processor memory leakage issue -


in rails application, have created background job file process aws sqs messages

lib/events/some_processor.rb

sqs = aws::sqs.new q = sqs.queues.create queue_name loop   q.receive_message |msg|   json_attrs = json.parse(msg.body)    event = event.find(json_attrs["id"].to_i)   event.process_logic(json_attrs["params"]) |status|     rails.logger.info(status)     msg.visibility_timeout = 30.minutes   end        end  ..  $> rails runner lib/events/some_processor.rb 

events queue processor running infinite loop in aws instances

in production environment memory of slow increasing , instance terminated when reaches high.

i tried in machine running couple of hours memory increased when messages in queue , memory reduce if no messages process.

how identify memory leaks , db connections when in process in development environment.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -