{"action":"created","issue":{"url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1381","labels_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1381/labels{/name}","comments_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1381/comments","events_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1381/events","html_url":"https://github.com/Valloric/YouCompleteMe/issues/1381","id":57788839,"number":1381,"title":"Compilation runs out of memory","user":{"login":"unphased","id":1542910,"avatar_url":"https://avatars.githubusercontent.com/u/1542910?v=3","gravatar_id":"","url":"https://api.github.com/users/unphased","html_url":"https://github.com/unphased","followers_url":"https://api.github.com/users/unphased/followers","following_url":"https://api.github.com/users/unphased/following{/other_user}","gists_url":"https://api.github.com/users/unphased/gists{/gist_id}","starred_url":"https://api.github.com/users/unphased/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unphased/subscriptions","organizations_url":"https://api.github.com/users/unphased/orgs","repos_url":"https://api.github.com/users/unphased/repos","events_url":"https://api.github.com/users/unphased/events{/privacy}","received_events_url":"https://api.github.com/users/unphased/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-16T10:42:28Z","updated_at":"2015-11-01T15:47:05Z","closed_at":"2015-02-16T11:02:05Z","body":"I have a 1GB VM (A t2.micro AWS EC2 instance) that I'm trying to set YCM up on, and I can't do it because it fails. \r\n\r\n```\r\n[ 97%] Building CXX object ycm/CMakeFiles/ycm_core.dir/PythonSupport.cpp.o\r\n[ 98%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Result.cpp.o\r\n[ 98%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Utils.cpp.o\r\n[100%] Building CXX object ycm/CMakeFiles/ycm_core.dir/versioning.cpp.o\r\n[100%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o\r\nTraceback (most recent call last):\r\n  File \"/home/centos/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py\", line 176, in <module>\r\n    Main()\r\n  File \"/home/centos/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py\", line 171, in Main\r\n    BuildYcmdLibs( GetCmakeArgs( args ) )\r\n  File \"/home/centos/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py\", line 149, in BuildYcmdLibs\r\n    sh.make( '-j', NumCores(), build_target, _out = sys.stdout )\r\n  File \"/home/centos/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/sh/sh.py\", line 1021, in __call__\r\n    return RunningCommand(cmd, call_args, stdin, stdout, stderr)\r\n  File \"/home/centos/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/sh/sh.py\", line 486, in __init__\r\n    self.wait()\r\n  File \"/home/centos/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/sh/sh.py\", line 500, in wait\r\n    self.handle_command_exit_code(exit_code)\r\n  File \"/home/centos/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/sh/sh.py\", line 516, in handle_command_exit_code\r\n    raise exc(self.ran, self.process.stdout, self.process.stderr)\r\nsh.ErrorReturnCode_2:\r\n\r\n  RAN: '/usr/bin/make -j 1 ycm_support_libs'\r\n\r\n  STDOUT:\r\n\r\n\r\n  STDERR:\r\nvirtual memory exhausted: Cannot allocate memory\r\nmake[3]: *** [ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o] Error 1\r\nmake[2]: *** [ycm/CMakeFiles/ycm_core.dir/all] Error 2\r\nmake[1]: *** [ycm/CMakeFiles/ycm_support_libs.dir/rule] Error 2\r\nmake: *** [ycm_support_libs] Error 2\r\n\r\n```\r\n\r\nHere's top: \r\n\r\n```\r\ntop - 10:38:57 up 19 min,  1 user,  load average: 0.00, 0.19, 0.31\r\nTasks: 109 total,   3 running, 106 sleeping,   0 stopped,   0 zombie\r\n%Cpu(s):  0.7 us,  0.3 sy,  0.0 ni, 99.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\nKiB Mem:   1016652 total,   260212 used,   756440 free,        0 buffers\r\nKiB Swap:        0 total,        0 used,        0 free.    52300 cached Mem\r\n\r\n  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND\r\n    1 root      20   0   49900   3572    980 S  0.0  0.4   0:02.16 systemd\r\n    2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd\r\n    3 root      20   0       0      0      0 S  0.0  0.0   0:00.01 ksoftirqd/0\r\n    5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H\r\n    7 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0\r\n    8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh\r\n    9 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/0\r\n   10 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/1\r\n   11 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/2\r\n   12 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/3\r\n   13 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/4\r\n   14 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/5\r\n   15 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/6\r\n   16 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/7\r\n   17 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/8\r\n   18 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/9\r\n   19 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/10\r\n   20 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/11\r\n   21 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/12\r\n   22 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/13\r\n   23 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/14\r\n   24 root      20   0       0      0      0 S  0.0  0.0   0:00.32 rcu_sched\r\n   25 root      20   0       0      0      0 R  0.0  0.0   0:00.50 rcuos/0\r\n   26 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/1\r\n   27 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/2\r\n   28 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/3\r\n   29 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/4\r\n   30 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/5\r\n   31 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/6\r\n   32 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/7\r\n   33 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/8\r\n   34 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/9\r\n   35 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/10\r\n   36 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/11\r\n   37 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/12\r\n   38 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuos/13\r\n\r\n```\r\nAnyone know of tricks to limit the compiler to prevent it from trying to swap? I'll add a swap partition and try again, but in the meantime... maybe there's something I could do."},"comment":{"url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/comments/152839152","html_url":"https://github.com/Valloric/YouCompleteMe/issues/1381#issuecomment-152839152","issue_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1381","id":152839152,"user":{"login":"vheon","id":90633,"avatar_url":"https://avatars.githubusercontent.com/u/90633?v=3","gravatar_id":"","url":"https://api.github.com/users/vheon","html_url":"https://github.com/vheon","followers_url":"https://api.github.com/users/vheon/followers","following_url":"https://api.github.com/users/vheon/following{/other_user}","gists_url":"https://api.github.com/users/vheon/gists{/gist_id}","starred_url":"https://api.github.com/users/vheon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vheon/subscriptions","organizations_url":"https://api.github.com/users/vheon/orgs","repos_url":"https://api.github.com/users/vheon/repos","events_url":"https://api.github.com/users/vheon/events{/privacy}","received_events_url":"https://api.github.com/users/vheon/received_events","type":"User","site_admin":false},"created_at":"2015-11-01T15:47:05Z","updated_at":"2015-11-01T15:47:05Z","body":"@jitendra-1217 Have you tried the swap file suggested earlier?"}}