Browse Source

Add failure mode for OOM (#3959)

Feroze Mohideen 2 years ago
parent
commit
2e74abcb63
1 changed files with 4 additions and 0 deletions
  1. 4 0
      internal/porter_app/notifications/porter_error/codes.go

+ 4 - 0
internal/porter_app/notifications/porter_error/codes.go

@@ -81,6 +81,10 @@ func ErrorCode(agentSummary, agentDetail string) PorterErrorCode {
 		return PorterErrorCode_MemoryLimitExceeded
 		return PorterErrorCode_MemoryLimitExceeded
 	}
 	}
 
 
+	if strings.Contains(agentSummary, "requested more memory than is available") {
+		return PorterErrorCode_MemoryLimitExceeded
+	}
+
 	if strings.Contains(agentSummary, "requesting too much memory and cannot scale up") {
 	if strings.Contains(agentSummary, "requesting too much memory and cannot scale up") {
 		return PorterErrorCode_MemoryLimitExceeded_ScaleUp
 		return PorterErrorCode_MemoryLimitExceeded_ScaleUp
 	}
 	}