• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

mmap() failed: Cannot allocate memory

Scheduled Pinned Locked Moved Troubleshooting
15 Posts 2 Posters 2.8k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    Egnos
    last edited by Jan 1, 2021, 1:16 AM

    Hi,
    my MM seems to work correctly but during its execution I see many strings on the terminal:
    mmap () failed: Cannot allocate memory

    Below I attach the log:

    pi@MagicMirror:~/MagicMirror $ npm start
    
    > magicmirror@2.10.1 start /home/pi/MagicMirror
    > ./run-start.sh
    
    [01:56:08.640] [LOG]    Starting MagicMirror: v2.10.1
    [01:56:08.652] [LOG]    Loading config ...
    [01:56:08.663] [LOG]    Loading module helpers ...
    [01:56:08.676] [LOG]    Initializing new module helper ...
    [01:56:08.677] [LOG]    Module helper loaded: MMM-Page-Selector
    [01:56:08.680] [LOG]    No helper found for module: MMM-page-indicator.
    [01:56:08.681] [LOG]    No helper found for module: alert.
    [01:56:08.682] [LOG]    No helper found for module: clock.
    [01:56:09.351] [LOG]    Initializing new module helper ...
    [01:56:09.352] [LOG]    Module helper loaded: calendar
    [01:56:09.406] [LOG]    Initializing new module helper ...
    [01:56:09.408] [LOG]    Module helper loaded: MMM-newsfeedtouch
    [01:56:09.420] [LOG]    Initializing new module helper ...
    [01:56:09.422] [LOG]    Module helper loaded: mmm-suncalc
    [01:56:10.159] [LOG]    Initializing new module helper ...
    [01:56:10.160] [LOG]    Module helper loaded: MMM-NowPlayingOnSpotify
    [01:56:10.717] [LOG]    Initializing new module helper ...
    [01:56:10.718] [LOG]    Module helper loaded: MMM-DarkSkyForecast
    [01:56:11.278] [LOG]    Initializing new module helper ...
    [01:56:11.279] [LOG]    Module helper loaded: MMM-AQI
    [01:56:11.802] [LOG]    Initializing new module helper ...
    [01:56:11.802] [LOG]    Module helper loaded: MMM-Todoist
    [01:56:11.803] [LOG]    No helper found for module: MMM-Globe.
    [01:56:11.804] [LOG]    No helper found for module: MMM-EARTH-Live.
    [01:56:11.811] [LOG]    No helper found for module: MMM-ISS-Live.
    [01:56:11.814] [LOG]    Initializing new module helper ...
    [01:56:11.815] [LOG]    Module helper loaded: MMM-ISS
    [01:56:11.816] [LOG]    No helper found for module: planetrise.
    [01:56:11.820] [LOG]    Initializing new module helper ...
    [01:56:11.821] [LOG]    Module helper loaded: MMM-Lunartic
    [01:56:11.821] [LOG]    All module helpers loaded.
    [01:56:11.822] [LOG]    Starting server on port 8080 ... 
    [01:56:11.846] [LOG]    Server started ...
    [01:56:11.848] [LOG]    Connecting socket for: MMM-Page-Selector
    [01:56:11.851] [LOG]    Connecting socket for: calendar
    [01:56:11.853] [LOG]    Starting node helper for: calendar
    [01:56:11.854] [LOG]    Connecting socket for: MMM-newsfeedtouch
    [01:56:11.856] [LOG]    Starting module: MMM-newsfeedtouch
    [01:56:11.859] [LOG]    Connecting socket for: mmm-suncalc
    [01:56:11.860] [LOG]    Starting node_helper for mmm-suncalc: 
    [01:56:11.862] [LOG]    Connecting socket for: MMM-NowPlayingOnSpotify
    [01:56:11.865] [LOG]    Connecting socket for: MMM-DarkSkyForecast
    [01:56:11.867] [LOG]    ====================== Starting node_helper for module [MMM-DarkSkyForecast]
    [01:56:11.868] [LOG]    Connecting socket for: MMM-AQI
    [01:56:11.871] [LOG]    MMM-AQI helper started ...
    [01:56:11.872] [LOG]    Connecting socket for: MMM-Todoist
    [01:56:11.874] [LOG]    Starting node helper for: MMM-Todoist
    [01:56:11.877] [LOG]    Connecting socket for: MMM-ISS
    [01:56:11.881] [LOG]    Starting node_helper for: MMM-ISS
    [01:56:11.884] [LOG]    Connecting socket for: MMM-Lunartic
    [01:56:11.887] [LOG]    Starting node_helper for: MMM-Lunartic
    [01:56:11.888] [LOG]    Sockets connected & modules started ...
    [01:56:12.119] [LOG]    Launching application.
    [01:56:15.611] [LOG]    Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/53/Italy_Holidays.ics - Interval: 300000
    [01:56:15.664] [LOG]    Create new news fetcher for url: https://www.astronomiamo.it/DivulgazioneAstronomica/Astronomiamo-RSS/Notizie - Interval: 300000
    [01:56:15.788] [LOG]    Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/223/F1_Schedule_2018.ics - Interval: 300000
    [01:56:15.791] [LOG]    Create new news fetcher for url: https://www.ansa.it/sito/ansait_rss.xml - Interval: 300000
    [01:56:15.900] [ERROR]  (node:3678) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    [01:56:15.901] [ERROR]  (node:3678) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    [01:56:16.249] [LOG]    Refreshed access token because it has expired. Expired at: 01:56:15 now is: 01:56:16
    [01:56:20.864] [LOG]    Use existing news fetcher for url: https://www.astronomiamo.it/DivulgazioneAstronomica/Astronomiamo-RSS/Notizie
    [01:56:22.568] [LOG]    Use existing news fetcher for url: https://www.ansa.it/sito/ansait_rss.xml
    [01:56:23.106] [LOG]    Refreshed access token because it has expired. Expired at: 01:56:22 now is: 01:56:23
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    mmap() failed: Impossibile allocare memoria
    
    

    What is happening?
    Can you help me?

    Thanks
    Happy New Year to all!

    My Mirror https://forum.magicmirror.builders/topic/17262/the-raspimirror-was-born/7

    1 Reply Last reply Reply Quote 0
    • E Offline
      Egnos
      last edited by Jan 2, 2021, 6:18 PM

      UP!
      Can someone help me? :disappointed_but_relieved_face:

      My Mirror https://forum.magicmirror.builders/topic/17262/the-raspimirror-was-born/7

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil
        last edited by Jan 2, 2021, 6:22 PM

        no idea… would take a bit of debugging

        in a terminal window do
        free -m
        lsb_release -a
        uname -a

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        E 1 Reply Last reply Jan 3, 2021, 12:57 AM Reply Quote 0
        • E Offline
          Egnos @sdetweil
          last edited by Jan 3, 2021, 12:57 AM

          @sdetweil I’ve done a lot of testing and I think the problem is audio.
          For now I have found a configuration that does not give many problems.
          Could it be a resource issue?

          My Mirror https://forum.magicmirror.builders/topic/17262/the-raspimirror-was-born/7

          S 1 Reply Last reply Jan 3, 2021, 1:27 AM Reply Quote 0
          • S Offline
            sdetweil @Egnos
            last edited by Jan 3, 2021, 1:27 AM

            @Egnos could be. the error is no memory

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • E Offline
              Egnos
              last edited by Jan 3, 2021, 2:04 AM

              @sdetweil said in mmap() failed: Cannot allocate memory:

              the error is no memory

              No memory do you mean RAM or SD memory?

              My Mirror https://forum.magicmirror.builders/topic/17262/the-raspimirror-was-born/7

              S 1 Reply Last reply Jan 3, 2021, 2:42 AM Reply Quote 0
              • S Offline
                sdetweil @Egnos
                last edited by Jan 3, 2021, 2:42 AM

                @Egnos ram technically heap.

                could be a bug in the module or a library it uses

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • E Offline
                  Egnos
                  last edited by Jan 3, 2021, 10:16 AM

                  I found the follow procedure for prevent Raspberry Pi memory allocation failure.

                  link

                  1. All commands should be issued as root:
                  sudo su
                  

                  1.5) If you have previously uninstalled dphys-swapfile:

                  apt-get install dphys-swapfile
                  
                  1. Set the swap file size to double the amount on RAM:
                  echo "CONF_SWAPSIZE=512" > /etc/dphys-swapfile
                  dphys-swapfile setup
                  

                  If you have 512 MB RAM on the Pi then set swapsize to 1024.

                  1. Enable swap
                  dphys-swapfile swapon
                  
                  1. Exit the root shell
                  exit
                  

                  And that’s it.

                  Could be the solution to use the SWAP file?

                  My Mirror https://forum.magicmirror.builders/topic/17262/the-raspimirror-was-born/7

                  S 1 Reply Last reply Jan 3, 2021, 2:10 PM Reply Quote 0
                  • S Offline
                    sdetweil @Egnos
                    last edited by Jan 3, 2021, 2:10 PM

                    @Egnos maybe. but I don’t know if you ever constrained before. one of the commands I asked for results from was the memory free command
                    free -m

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      Egnos
                      last edited by Jan 3, 2021, 10:11 PM

                      @sdetweil said in mmap() failed: Cannot allocate memory:

                      no idea… would take a bit of debugging

                      in a terminal window do
                      free -m
                      lsb_release -a
                      uname -a

                      As requested:

                      pi@MagicMirror:~ $ lsb_release -a
                      No LSB modules are available.
                      Distributor ID:	Raspbian
                      Description:	Raspbian GNU/Linux 10 (buster)
                      Release:	10
                      Codename:	buster
                      
                      pi@MagicMirror:~ $ uname -a
                      Linux MagicMirror 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux
                      
                      

                      Sometimes the message “mmap() failed: Cannot allocate memory” appears before the RAM saturation, no longer allowing MMM-GoogleAssistant to be able to launch searches on YouTube, etc …
                      Sometimes the error appears shortly after starting MM sometimes after a long time.
                      In the Sound page of @Bugsounet I read that the choice of the audio player could give these problems (“With HTML5, some device have some trouble with sound output (no sound output, only chime, mmap memory issue,…)”) but I have already done some tests and the only one that works is “mpg321”.

                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         452          95          43         376         373
                      Swap:            99           8          91
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         455          58         253         411         165
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         462          48         254         413         157
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         463          48         253         413         157
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         465          35         263         424         145
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         466          47         249         410         158
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         470          43         249         410         153
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         471          31         261         422         142
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         468          53         248         403         157
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         467          56         246         400         161
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         465          55         249         403         160
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         467          32         270         425         136
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         468          31         270         424         136
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         469          30         270         424         135
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         469          29         271         426         134
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         469          31         272         423         133
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         471          47         254         405         149
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         473          44         254         406         147
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         473          44         254         406         147
                      Swap:            99          84          15
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         507          46         252         371         114
                      Swap:            99          96           3
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         513          37         255         374         105
                      Swap:            99          96           3
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         508          37         260         379         105
                      Swap:            99          96           3
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         508          36         260         379         105
                      Swap:            99          96           3
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         540          37         254         347          79
                      Swap:            99          99           0
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         540          37         254         346          79
                      Swap:            99          99           0
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         540          37         254         346          79
                      Swap:            99          99           0
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         528          48         254         348          91
                      Swap:            99          99           0
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         455         120         248         348         170
                      Swap:            99          99           0
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         465          60         269         398         141
                      Swap:            99          99           0
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         465          60         268         398         141
                      Swap:            99          99           0
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         494          35         253         394         122
                      Swap:            99          99           0
                      pi@MagicMirror:~ $ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:            924         495          54         251         374         127
                      Swap:            99          99           0
                      
                      
                      mmap() failed: Impossibile allocare memoria
                      mmap() failed: Impossibile allocare memoria
                      mmap() failed: Impossibile allocare memoria
                      mmap() failed: Impossibile allocare memoria
                      mmap() failed: Impossibile allocare memoria
                      ^[[Ammap() failed: Impossibile allocare memoria
                      mmap() failed: Impossibile allocare memoria
                      mmap() failed: Impossibile allocare memoria
                      
                      

                      Would you have the patience to help me?

                      Many Thanks.

                      My Mirror https://forum.magicmirror.builders/topic/17262/the-raspimirror-was-born/7

                      S 1 Reply Last reply Jan 3, 2021, 10:18 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        9/15
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy