MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

All of a sudden SSH is really lagging/slow.

  • After coming back to my mirror after a month or so of not touching it as I’ve been quite happy with the set up I’ve noticed whenever im in SSH that its extremely slow. To the point of it becoming very difficult to even type on the command line let alone use nano.

    I’m wondering if anyone has any ways I could troubleshoot why this is happening. I’ve not moved the physical Pi or changed anything. It used to run absolutely perfectly.

    Any help would be greatly appreciated.

  • Moderator

    I know this is the typical IT support question, but did you reboot the raspberry and check if this lag still is the case after rebooting?

  • @yawns thanks for the reply. Yes I’ve restarted it many-many times in the last few days. Valid question.

  • Moderator

    Ok. Is your pi connected with wifi or lan?

    You could try this:

    sudo nano /etc/ssh/sshd_config, then add UseDNS no to the file and save your changes. Afterwards reboot your pi or run sudo service ssh restart

  • Module Developer

    @Mar If you get in to SSH, check if you have a HUGE file called “core” in your MagicMirror directory. If you do, delete it. I have had the same issue, EVERYTHING get’s slow and eventually you cant do anything. I noticed the file on my second install (again) and deleted it before it died. Now I’m trying to find how this file get’s created. It should not be there.

  • Project Sponsor Module Developer

    @Snille does a module create this file? I don’t have a file called core in my mm directory

  • Thanks for the tips everyone.
    @yawns I’m connected via wifi and in the same room as the router, nothing has changed here. I’ve attempted to add the UseDNS=no but it didnt seem to change the major lag im experiencing. i.e i type and it takes a few seconds for it to show up on the command line. But when I tried ‘UseDNS no’ (as this seemed to be the syntax in the file) it seemed to be a little speedier upon the next reboot! Not near as fast as it was a few weeks back but now i can get in and navigate around etc. Thanks!

    I wonder if there is anything else that could be slowing it down, how does the UsDNS command speed things up like it did?

    @Snille i’ve done an ls -alh in a few of the directories and have no large file name core. Would there be any other temp/log type of files that could be causing a slowdown?

  • Module Developer

    @strawberry-3.141 I don’t know yet. I just rebooted my mirror now and got it back again. I’m trying to figuring it out.
    Here is my MagicMirror dir after this reboot…
    The file is there again… 😕

    drwxr-xr-x  16 pi pi      4096 Mar 22 11:06 .
    drwxr-xr-x  21 pi pi      4096 Mar 22 11:08 ..
    -rw-r--r--   1 pi pi     11172 Mar 21 13:37
    drwxr-xr-x   2 pi pi      4096 Mar 21 13:52 config
    -rw-------   1 pi pi 574697472 Mar 22 11:07 core
    drwxr-xr-x   2 pi pi      4096 Mar 21 13:37 css
    -rw-r--r--   1 pi pi       266 Mar 21 13:37
    -rw-r--r--   1 pi pi       378 Mar 21 13:37 Dockerfile
    -rw-r--r--   1 pi pi       964 Mar 21 13:37 .dockerignore
    -rw-r--r--   1 pi pi       132 Mar 21 13:37 .eslintignore
    -rw-r--r--   1 pi pi       319 Mar 21 13:37 .eslintrc.json
    drwxr-xr-x  20 pi pi      4096 Mar 21 13:37 fonts
    drwxr-xr-x   8 pi pi      4096 Mar 22 11:09 .git
    drwxr-xr-x   2 pi pi      4096 Mar 21 13:37 .github
    -rw-r--r--   1 pi pi       915 Mar 21 13:37 .gitignore
    -rw-r--r--   1 pi pi      2173 Mar 21 13:37 Gruntfile.js
    -rw-r--r--   1 pi pi      2337 Mar 21 13:37 index.html
    drwxr-xr-x   3 pi pi      4096 Mar 21 13:37 installers
    drwxr-xr-x   2 pi pi      4096 Mar 21 13:37 js
    -rw-r--r--   1 pi pi       271 Mar 21 13:37 jsconfig.json
    -rw-r--r--   1 pi pi      1118 Mar 21 13:37
    drwxr-xr-x  27 pi pi      4096 Mar 22 08:40 modules
    drwxr-xr-x 561 pi pi     20480 Mar 22 10:55 node_modules
    -rw-r--r--   1 pi pi      1789 Mar 21 13:37 package.json
    -rw-r--r--   1 pi pi     11431 Mar 21 13:37
    -rw-r--r--   1 pi pi       141 Mar 21 13:37
    drwxr-xr-x   2 pi pi      4096 Mar 21 13:37 serveronly
    -rw-r--r--   1 pi pi       478 Mar 21 13:37 .snyk
    drwxr-xr-x   2 pi pi      4096 Mar 21 13:37 splashscreen
    -rw-r--r--   1 pi pi       126 Mar 21 13:37 .stylelintrc
    drwxr-xr-x   6 pi pi      4096 Mar 21 13:37 tests
    drwxr-xr-x   2 pi pi      4096 Mar 21 13:37 translations
    -rw-r--r--   1 pi pi       229 Mar 21 13:37 .travis.yml
    drwxr-xr-x   3 pi pi      4096 Mar 21 23:24 vendor

  • Project Sponsor Module Developer

    @Snille disable all modules delete this file and put only one module step by step to check what is creating this file. Can you open that file in an editor to get more details?

    @Mar which modules you’re using? how about the cpu usage?

  • Module Developer

    @strawberry-3.141 That’s what I’m doing right now… 🙂

Log in to reply