rethinkdb / logstash-input-rethinkdb

Other
55 stars 13 forks source link

Advice on closed connection crash #18

Closed sagivf closed 7 years ago

sagivf commented 7 years ago

Hey, thanks for this plugin!

It works great, but every couple of days it crashed due to the connection being closed. Any advice on how to restart automatically?

2017-01-09T01:13:26.171815+00:00 app[worker.1]: {:timestamp=>"2017-01-09T01:13:26.169000+0000", :message=>"Connection closed by server.\nBacktrace:\nr.db(\"rethinkdb\").table(\n^^^^^^^^^^^^^^^^^^^^^^^^\n  \"table_status\"\n  ^^^^^^^^^^^^^^\n).changes({\"include_initial\" =>\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n     true,\n     ^^^^^\n   \"squash\" =>\n   ^^^^^^^^^^^\n     true,\n     ^^^^^\n   \"include_states\" =>\n   ^^^^^^^^^^^^^^^^^^^\n     true}\n     ^^^^^\n).filter {|var_1|\n^^^^^^^^^^^^^^^^^\n  var_1[\"db\"].eq(\"muzli\").and(var_1[\"status\"][\"all_replicas_ready\"])\n  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n}.pluck({\"new_val\" => [\"db\", \"name\"], \"old_val\" => [\"db\", \"name\"]})\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^", :level=>:error}
2017-01-09T01:13:26.173860+00:00 app[worker.1]: {:timestamp=>"2017-01-09T01:13:26.173000+0000", :message=>"Unregistering feed for db 'muzli'"}
2017-01-09T01:13:26.174689+00:00 app[worker.1]: {:timestamp=>"2017-01-09T01:13:26.174000+0000", :message=>"Unregistering table muzli.feeds"}
calvinbrewer commented 7 years ago

Hey @sagivf did you ever figure out a root cause?

sagivf commented 7 years ago

Hey @calvinbrewer. Not really, It happens a lot less once I moved to a stronger server with more memory. I created cron job that runs every 5 min and checks the logs for this error and restarts if needed. Seems to hold up ok.