mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-19 21:51:44 +00:00
add metrics for EPIPE errors
Co-Authored-By: Jakob Ackermann <jakob.ackermann@overleaf.com>
This commit is contained in:
parent
e3b1472c7f
commit
ecaa7035f5
1 changed files with 3 additions and 0 deletions
|
@ -26,6 +26,7 @@ const LockManager = require('./DockerLockManager')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const Path = require('path')
|
const Path = require('path')
|
||||||
const _ = require('underscore')
|
const _ = require('underscore')
|
||||||
|
const metrics = require('metrics-sharelatex')
|
||||||
|
|
||||||
logger.info('using docker runner')
|
logger.info('using docker runner')
|
||||||
|
|
||||||
|
@ -410,6 +411,7 @@ module.exports = DockerRunner = {
|
||||||
|
|
||||||
const callbackWithRetry = error => {
|
const callbackWithRetry = error => {
|
||||||
if (error.message.match(/EPIPE/)) {
|
if (error.message.match(/EPIPE/)) {
|
||||||
|
metrics.inc('container-inspect-epipe-retry')
|
||||||
return inspectContainer(container, callback)
|
return inspectContainer(container, callback)
|
||||||
}
|
}
|
||||||
callback(error)
|
callback(error)
|
||||||
|
@ -420,6 +422,7 @@ module.exports = DockerRunner = {
|
||||||
if ((error != null ? error.statusCode : undefined) === 404) {
|
if ((error != null ? error.statusCode : undefined) === 404) {
|
||||||
return createAndStartContainer()
|
return createAndStartContainer()
|
||||||
} else if (error != null) {
|
} else if (error != null) {
|
||||||
|
metrics.inc('container-inspect-epipe-error')
|
||||||
logger.err(
|
logger.err(
|
||||||
{ container_name: name, error },
|
{ container_name: name, error },
|
||||||
'unable to inspect container to start'
|
'unable to inspect container to start'
|
||||||
|
|
Loading…
Reference in a new issue