4G Memory limit - numbers don't add up

memory-usage

#1

Hi,
I am building my project on CircleCI and I have systematically the error “Your build has exceeded the memory limit of 4G on 1 container. The results of this build are likely invalid. We have taken a snapshot of the memory usage at the time, which you can find in a build artifact named memory-usage.txt. The RSS column in this file shows the amount of memory used by each process, measured in kilobytes.”

The env is:
Ubuntu 14.04
Java
running maven
It usually breaks while doing the test coverage report

My issue is, I’ve looked at the memory-usage.txt and the sum of all the used memory is less than 1G

Here it is:
PID RSS %CPU COMMAND
17579 544788 64.1 /usr/lib/jvm/jdk1.8.0/bin/java -Xmx2048m -classpath /usr/local/apache-maven/boot/plexus-classworlds-2.5.2.jar -Dclassworlds.conf=/usr/local/apache-maven/bin/m2.conf -Dmaven.home=/usr/local/apache-maven org.codehaus.plexus.classworlds.launcher.Launcher clean test jacoco:report coveralls:report
2058 177392 0.1 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock
1489 51060 0.1 /usr/bin/mongod --config /etc/mongod.conf
18221 35244 3.4 /usr/lib/erlang/erts-5.10.4/bin/beam.smp -Bd -K true -A 4 – -root /usr/lib/erlang -progname erl – -home /var/lib/couchdb – -noshell -noinput -os_mon start_memsup false start_cpu_sup false disk_space_check_interval 1 disk_almost_full_threshold 1 -sasl errlog_type error -couch_ini /etc/couchdb/default.ini /etc/couchdb/local.ini -s couch
43 20040 0.0 Xvfb :99 -screen 0 1280x1024x24
2223 16884 0.0 /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5/main -c config_file=/etc/postgresql/9.5/main/postgresql.conf
2493 16584 0.0 /usr/lib/postgresql/9.6/bin/postgres -D /var/lib/postgresql/9.6/main -c config_file=/etc/postgresql/9.6/main/postgresql.conf
2919 5692 2.0 sshd: ubuntu@pts/5
1420 4556 0.0 xfwm4 --daemon
2865 4024 0.0 sshd: ubuntu [priv]
1697 3048 0.0 /usr/sbin/sshd -D
1 2892 0.1 /sbin/init
2512 2756 0.0 postgres: 9.6/main: autovacuum launcher process
2510 2740 0.0 postgres: 9.6/main: writer process
2237 2732 0.0 postgres: 9.5/main: autovacuum launcher process
1419 2604 0.0 /usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd
1593 2408 0.0 dhclient -1 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0
2863 1952 0.0 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 116:123
2509 1932 0.0 postgres: 9.6/main: checkpointer process
2234 1888 0.0 postgres: 9.5/main: checkpointer process
2513 1820 0.0 postgres: 9.6/main: stats collector process
2238 1772 0.0 postgres: 9.5/main: stats collector process
2511 1704 0.0 postgres: 9.6/main: wal writer process
2235 1680 0.0 postgres: 9.5/main: writer process
2236 1676 0.0 postgres: 9.5/main: wal writer process
18204 1676 0.0 su couchdb -c /usr/bin/couchdb
18234 1480 0.0 /lib/systemd/systemd-logind
1410 1456 0.0 /lib/systemd/systemd-udevd --daemon
1470 1200 0.0 /usr/sbin/irqbalance
18606 1160 0.0 ps -e -o pid,rss,%cpu,command --sort -rss
18248 1144 0.0 rsyslogd
18206 1092 0.0 dbus-daemon --system --fork
1417 996 0.0 //bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
1455 996 0.0 cron
1531 956 0.0 dnsmasq -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file=/run/lxc/dnsmasq.pid --conf-file= --listen-address 10.0.4.1 --dhcp-range 10.0.4.2,10.0.4.254 --dhcp-lease-max=253 --dhcp-no-override --except-interface=lo --interface=lxcbr0 --dhcp-leasefile=/var/lib/misc/dnsmasq.lxcbr0.leases --dhcp-authoritative
1423 848 0.0 /sbin/getty -8 38400 tty4
2786 848 0.0 /sbin/getty -8 38400 console
1431 844 0.0 /sbin/getty -8 38400 tty3
1430 840 0.0 /sbin/getty -8 38400 tty2
2788 836 0.0 /sbin/getty -8 38400 tty1
1787 752 0.0 /bin/sh /usr/bin/mysqld_safe
1416 728 0.0 dbus-launch --autolaunch 54f9f16cebc74faf7c49864956cb7375 --binary-syntax --close-stderr
18236 652 0.0 upstart-file-bridge --daemon
18499 652 0.0 /bin/sh /etc/init.d/ondemand background
1407 648 0.0 upstart-udev-bridge --daemon
18376 644 0.0 sh -s disksup
1456 636 0.0 acpid -c /etc/acpi/events -s /var/run/acpid.socket
337 628 0.0 upstart-socket-bridge --daemon
18506 356 0.0 sleep 60

What am I missing? Are there other memory usage that are not shown here? How can I solve this issue?


#2

That does look strange. Can you DM my your org/project so I can take a look?


#3

Sorry I’m new to this forum. I don’t see any button for DM.

But my project is open source so I have no problem publishing the name:

it is: adridadou/eth-contract-api


#4

Ah, brand new users don’t have the DM feature to prevent possible spam.

I took a look at https://circleci.com/gh/adridadou/eth-contract-api/223#artifacts/containers/0 and I see the top item taking 4179804, or 4 gig. Can you provide the build number you were looking at that had the low numbers?


#5

It was the build 230

Thank you for pointing out the issue now I can try to see what I have this issue. It looks like the test coverage agent is the problem


#6