I'm trying to monitor the memory usage growth at each command to the
ferret DRb server, to do this I modified ferret_server.rb method_missing
definition to:
def method_missing(name, *args)
clazz = args.shift.constantize
begin
@logger.debug "call index method: #{name} with #{args.inspect} -
server memory: #{`ps -o rss -p #{Process.pid}`.split("\n").last} KB"
clazz.aaf_index.send name, *args
rescue NoMethodError
@logger.debug "no luck, trying to call class method instead"
clazz.send name, *args
end
rescue
@logger.error "ferret server error #{$!}\n#{$!.backtrace.join '\n'}"
raise
end
I added this: server memory: #{`ps -o rss -p
#{Process.pid}`.split("\n").last} KB
to the log of each command, so we'll be able to see how memory was just
before the command.
I don't know if this will help, but we'll be to see how the memory is
growing.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk