title: influxdb-java: org.influxdb.InfluxDBIOException: java.net.SocketException: Connection reset by peer: socket write error
body: <p>I'm testing InfluxDB to store sensor time series. I'm using the <a href="https://github.com/influxdata/influxdb-java" rel="nofollow noreferrer">influxdb-java</a> client library (version 2.15) and I'm running InfluxDB 1.7.6 locally for test purpose.</p>
  
  <p>All my points are stored .csv files (one per sensor) which are themselves stored in .zip files (one per dataset). My code run through each line of each csv files. Points are written in batch mode.</p>
  
  <pre><code>/**
   * Get the connection to the database
   */
  InfluxDB influxDB = InfluxDBFactory.connect("http://192.168.51.51:8086");
  influxDB.query(new Query("CREATE DATABASE theia_in_situ"));
  influxDB.setDatabase("theia_in_situ");
  influxDB.enableBatch();
  influxDB.setLogLevel(InfluxDB.LogLevel.BASIC);
  /**
   * Create batch point to write each measure of the time serie more efficiently
   */
  BatchPoints batchPoints = BatchPoints
          .database("theia_in_situ")
          .build();
  </code></pre>
  
  <p>For each CSV data file the following method is executed:</p>
  
  <pre><code>public static void createAndImportTimeSeriesDocuments(InputStream txtFileIn, String observationId, String producerId,
          InfluxDB influxDB, BatchPoints batchPoints) throws IOException, ParseException {
      DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
      /**
       * Store the variable name
       */
      String observedProperty = null;
      try (BufferedReader br = new BufferedReader(new InputStreamReader(txtFileIn));) {
          String line = null;
          /**
           * Read the headers
           */
          while ((line = br.readLine()).substring(0, 1).equals("#")) {
              if (line.substring(0, 15).equals("#Variable_name;")) {
                  observedProperty = line.split(";")[1];
              }
          }
          /**
           * Read the data
           */
          while ((line = br.readLine()) != null) {
              String[] lineSplitted = line.split(";", -1);
              Point point = Point.measurement(observedProperty)
                      .tag("producerId", producerId)
                      .tag("observationId", observationId)
                      .time(df.parse(lineSplitted[1]).getTime(), TimeUnit.MILLISECONDS)
                      .addField("value", lineSplitted[5])
                      .addField("flag", lineSplitted[6])
                      .build();
              batchPoints.point(point);
          }
          influxDB.write(batchPoints);
      }
  }
  </code></pre>
  
  <p>I can write one or few measurement but soon enough I get the following exception:</p>
  
  <blockquote>
    <p>Exception in thread "main" org.influxdb.InfluxDBIOException: java.net.SocketException: Connection reset by peer: socket write error
        at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:812)
        at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:463)</p>
  </blockquote>
  
  <p>I have already disabled max-concurrent-write-limit, max-enqueued-write-limit, enqueued-write-timeout (setting each value to 0 in <code>/etc/influxdb/influxdb.conf</code>) as  mentionned <a href="https://github.com/influxdata/influxdb-java/blob/master/FAQ.md#how-the-client-responds-to-concurrent-write-backpressure-from-server" rel="nofollow noreferrer">here</a>.
  Even though this issue is mentionned as FAQ in the Github page, I can't find any issue reproducing my problem.</p>
  
  <p>Any help would be appreciated.</p>