lib/new_relic/agent/agent.rb in newrelic_rpm-3.3.1.beta2 vs lib/new_relic/agent/agent.rb in newrelic_rpm-3.3.1

- old
+ new

@@ -1068,13 +1068,10 @@ harvest_transaction_traces unless @traces.empty? now = Time.now log.debug "Sending (#{@traces.length}) transaction traces" - # REMOVE THIS BEFORE SHIPPING - log.info "Sending tts with GUIDS #{@traces.collect{|t| t.guid}.join(",")}" - begin options = { :keep_backtraces => true } options[:record_sql] = @record_sql unless @record_sql == :off if @transaction_sampler.explain_enabled options[:explain_sql] = @transaction_sampler.explain_threshold @@ -1282,9 +1279,16 @@ harvest_and_send_timeslice_data else log.debug "Serializing agent data to disk" NewRelic::Agent.save_data end + rescue Exception => e + NewRelic::Control.instance.disable_serialization = true + NewRelic::Control.instance.log.warn("Disabling serialization: #{e.message}") + retry_count ||= 0 + retry_count += 1 + retry unless retry_count > 1 + raise e end # This method contacts the server to send remaining data and # let the server know that the agent is shutting down - this # allows us to do things like accurately set the end of the