• 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.9k 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 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
                    • S Offline
                      sdetweil @Egnos
                      last edited by Jan 3, 2021, 10:18 PM

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

                      Mem: 924 495 54 251 374 127
                      Swap: 99 99

                      u always have memory available, and never consume any swap space…

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      E 1 Reply Last reply Jan 3, 2021, 10:45 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/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