title: Kafka Connect JDBC Source OutOfMemoryError
body: <p>I'm running the following job with the <a href="https://docs.confluent.io/current/connect/connect-jdbc/docs/index.html" rel="nofollow noreferrer">Confluent JDBC-Source connector</a>:</p>
  
  <pre><code>{
      "name": "jobName",
      "config": {
          "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
          "mode": "timestamp",
          "timestamp.column.name": "dateColumn",
          "topic.prefix": "connect-test.",
          "connection.password": "pw",
          "tasks.max": "1",
          "connection.user": "un",
          "poll.interval.ms": "300000",
          "name": "jobName",
          "connection.url": "jdbc:sqlserver://serverName;Database=dbName;user=un;password=pw",
          "table.whitelist": "tableName"
      }
  }
  </code></pre>
  
  <p>I have a similar Kafka-Connect job running successfully against the same DB and with the same user, but with another smaller table. So connection isn't the issue.</p>
  
  <p>In the log on the Kafka-connect server running the job, I see this:</p>
  
  <pre><code>Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "KafkaBasedLog Work Thread - connect-configs"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-coordinator-heartbeat-thread | connect-cluster"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-producer-network-thread | producer-1"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "KafkaBasedLog Work Thread - connect-offsets"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-producer-network-thread | producer-3"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-4-thread-1"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-producer-network-thread | producer-2"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "KafkaBasedLog Work Thread - connect-status"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "DistributedHerder"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-1-thread-5"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "org.eclipse.jetty.server.session.HashSessionManager@2c243a24Timer"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "qtp1434297727-21"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "qtp1434297727-26"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "qtp1434297727-27"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-producer-network-thread | producer-14"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-producer-network-thread | producer-15"
  
  Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-1-thread-4"
  </code></pre>
  
  <p>So, not much to go on. The server that was running this job is now unresponsive, and not responding to REST calls. Any ideas?</p>