48057

cannot allocate memory error

Question:

I just ported my app over from python so I'm a bit new to Go. It seems I am having a memory issues. getAudioOnlyInfo: fork/exec /usr/local/bin/youtube-dl: cannot allocate memory.

This is run on a ubuntu machine. Via supervisor.

Edit:

setting the sysctl -w vm.swappiness=1 resolve the issue

Answer1:

For anyone else who runs into this problem, it was a related recent issue <a href="https://github.com/golang/go/issues/5838#issuecomment-171280473" rel="nofollow">in the golang issue</a>

<blockquote>

For all those affected, temporary workaround on Linux until it is fixed properly can be one of following:

<ol><li>enable unconditional overcommit: sysctl -w vm.overcommit_memory=1</li> <li>enable unconditional overcommit: sysctl -w vm.overcommit_memory=1 add swap to your host, with sysctl -w vm.swappiness=1 it will almost never going to be used, but it participates in calculations where Linux kernel decides to whether it can afford to satisfy allocation or not when default overcommit_memory=0 is in use</li> </ol></blockquote>

Recommend

  • A Database Error Occurred Error Number: 1146 in codeigniter
  • Express Morgan not writing logs to file or STDOUT
  • Controlling an object orbiting a sphere
  • how to test push notification in android phonegap?
  • Python 'hide' methods with __
  • node browserify for node core libraries
  • How to apply play-evolutions when running tests in play-framework?
  • How specify the required Java version in a Gradle build
  • es6 multiline template strings with no new lines and allow indents
  • Is it possible to convert rows to a variable number of columns in T-SQL?
  • LCS ALGORITHM ( example )
  • How to change the font size of a grid's children text blocks dynamically in c#?
  • Postgres JSONB: query values in JSON array
  • Configuring Jersey + Jetty + JSP
  • How to populate a Mutation for a different Cassandra table in a trigger
  • Selenium - how to switch to a different (login) window that is brought up?
  • Coin change recursive approach
  • C# XML Serialization/DeSerialization [closed]
  • Spring Mvc submit/delete checked (selected) records from table
  • SilverStripe: changing the order of GridField input elements
  • Detect when MathJax has finished loading in UIWebView
  • sec:authorize not being evaluated on spring-boot project
  • Backbone - Create Multiple Models in Collection - serverside
  • Execute powershell script on a remote computer using C#
  • watir webdriver - window not found
  • what do lines starting with double-slash '//' mean in a .npmrc?
  • Write to elasticsearch from spark is very slow
  • Unable to run testNG tests from maven
  • Synchronous Calls with jqGrid?
  • Copy and paste data from multiple workbooks to a worksheet in another Workbook
  • Separating definition/instantiation of template classes without 'extern'
  • java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/SpringDispatcher-ser
  • Add font awesome icon to custom add to cart button in Woocommerce 3
  • how to read to huge file into buffer
  • how to get the location(lat/lng) on google maps v3 from the location(x,y)
  • How to call jQuery function in HTML returned by AJAX
  • VSTS work items list through REST API
  • How to handle div that is created dynamically in a table
  • Google App Engine backend servlet not responding