Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"errno=104 Connection reset by peer" writes in php_error.log file too ma... #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Fluent/Logger/FluentLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ protected function connect()
}

// could not suppress warning without ini setting.
// for now, we use error control operators.
// for now, we use error control operators.
$socket = @stream_socket_client($this->transport, $errno, $errstr,
$this->getOption("connection_timeout", self::CONNECTION_TIMEOUT),
$connect_options
Expand Down Expand Up @@ -376,6 +376,8 @@ protected function postImpl(Entity $entity)
$this->reconnect();
} else if (isset($errors['message']) && strpos($errors['message'], 'errno=11 ') !== false) {
// we can ignore EAGAIN message. just retry.
} else if (isset($errors['message']) && strpos($errors['message'], 'errno=104 ') !== false) {
// fwrite(): send of 569 bytes failed with errno=104 Connection reset by peer
} else {
error_log("unhandled error detected. please report this issue to http://github.com/fluent/fluent-logger-php/issues: " . var_export($errors, true));
}
Expand Down