File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
airbyte-workers/src/main/java/io/airbyte/workers Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -520,6 +520,13 @@ private void setupStdOutAndStdErrListeners() {
520
520
try {
521
521
LOGGER .info ("Creating stdout socket server..." );
522
522
final var socket = stdoutServerSocket .accept (); // blocks until connected
523
+ // cat /proc/sys/net/ipv4/tcp_keepalive_time
524
+ // 300
525
+ // cat /proc/sys/net/ipv4/tcp_keepalive_probes
526
+ // 5
527
+ // cat /proc/sys/net/ipv4/tcp_keepalive_intvl
528
+ // 60
529
+ socket .setKeepAlive (true );
523
530
LOGGER .info ("Setting stdout..." );
524
531
this .stdout = socket .getInputStream ();
525
532
} catch (final IOException e ) {
@@ -531,6 +538,7 @@ private void setupStdOutAndStdErrListeners() {
531
538
try {
532
539
LOGGER .info ("Creating stderr socket server..." );
533
540
final var socket = stderrServerSocket .accept (); // blocks until connected
541
+ socket .setKeepAlive (true );
534
542
LOGGER .info ("Setting stderr..." );
535
543
this .stderr = socket .getInputStream ();
536
544
} catch (final IOException e ) {
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ public boolean isFinished() {
138
138
Preconditions .checkState (destinationProcess != null );
139
139
// As this check is done on every message read, it is important for this operation to be efficient.
140
140
// Short circuit early to avoid checking the underlying process.
141
- final var isEmpty = !messageIterator .hasNext ();
141
+ final var isEmpty = !messageIterator .hasNext (); // hasNext is blocking.
142
142
if (!isEmpty ) {
143
143
return false ;
144
144
}
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ public boolean isFinished() {
90
90
Preconditions .checkState (sourceProcess != null );
91
91
// As this check is done on every message read, it is important for this operation to be efficient.
92
92
// Short circuit early to avoid checking the underlying process.
93
- final var isEmpty = !messageIterator .hasNext ();
93
+ final var isEmpty = !messageIterator .hasNext (); // hasNext is blocking.
94
94
if (!isEmpty ) {
95
95
return false ;
96
96
}
You can’t perform that action at this time.
0 commit comments