Skip to content

Commit 316fc47

Browse files
Increase max RAM to prevent service oom (#269)
* Increase max RAM to prevent service oom * Update golang version for http.NewRequestWithContext * Update go version to 1.13 * Specify every package expliclity for test to exclude main.go
1 parent 2fd1fd0 commit 316fc47

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dist: xenial
1919

2020
language: go
2121
go:
22-
- 1.12
22+
- 1.13
2323

2424
# Without this, annotator.sh fails, related to gcloud.
2525
sudo: required
@@ -72,7 +72,10 @@ script:
7272
- source "${HOME}/google-cloud-sdk/path.bash.inc"
7373

7474
# Run all tests and gather and submit coverage information.
75-
- GCLOUD_PROJECT=mlab-testing go test -v -coverpkg=./... -coverprofile=coverage.cov ./...
75+
# - GCLOUD_PROJECT=mlab-testing go test -v -coverpkg=./... -coverprofile=coverage.cov ./...
76+
# Exclude main.go from tests to prevent "duplicate main.init.0" errors.
77+
- GCLOUD_PROJECT=mlab-testing go test -v -coverpkg=./... -coverprofile=coverage.cov ./asn/... ./legacy/... ./handler/... ./metrics/... ./geoloader/... ./manager/... ./geolite2v2/... ./api/... ./loader/... ./directory/... ./iputils/...
78+
7679
- $HOME/gopath/bin/goveralls -coverprofile=coverage.cov -service=travis-ci
7780
# Run benchmarks
7881
- go test -bench . ./geolite2v2/...

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine as build
1+
FROM golang:1.13-alpine as build
22

33
RUN apk add --no-cache git pkgconfig geoip-dev geoip gcc libc-dev
44
ADD . /go/src/github.com/m-lab/annotation-service

annotator.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ service: annotator
99

1010
# TODO(dev): adjust CPU and memory based on actual requirements.
1111
resources:
12-
cpu: 20
12+
cpu: 30
1313
# Instances support between [(cpu * 0.9) - 0.4, (cpu * 6.5) - 0.4]
1414
# Actual memory available is exposed via GAE_MEMORY_MB environment variable.
1515
# Service now loads ALL datasets, so it needs quite a lot of memory.
16-
memory_gb: 129
16+
memory_gb: 194
1717

1818
# Annotation service uses disk for loading legacy Geolite datasets. It now loads many
1919
# concurrently, so needs a lot of disk space.

0 commit comments

Comments
 (0)