Network connection extremely slow after installing TouchUI

I have been using OctoPrint for several months with no issues, but after installing the TouchUI plugin, my network connection has slowed/almost stopped. I am connected via WiFi and can see that the router has assigned an IP address and the server is online. When I try to connect to OctoPrint via a browser, it usually times out or takes minutes to load the page. When controlling the printer via TouchUI on the touch panel that is directly connected to the Pi, it works great. Printing works fine as well.

If I ping the raspberry pi from a workstation, it usually times out. If I am able to connect (usually takes minutes to load) all messages are greatly delayed. The issue started after TouchUI was installed, but I also upgraded OctoPrint during the install, so I can't say for certain that this is the issue.

I don't have an RJ45 port anywhere near the printer, so that isn't an option long term. Any other suggestions would be greatly appreciated.

Nick

Hi @ngiovas

I don't know the plugin but you can can you check two things.

  1. ssh on Pi and using top try to verify if octoprint process is consuming all the cpu available, below my cpu during printing and with webcam.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
397 pi 20 0 274616 66188 8904 S 11.4 17.6 6:42.65 octoprint
390 root 20 0 43756 3392 2956 S 0.2 0.9 0:13.38 mjpg_streamer
1074 pi 20 0 10188 2864 2504 R 0.2 0.8 0:01.07 top

  1. check if network work fine with ifconfig command.

Also you can try to remove the plugin to see if something happen.

Bye.
Leo

Which Raspberry Pi model is it? If it's the 3B or 3B+ it should behave nicely. Older models might not have enough RAM.

If part of your installation for TouchUI involved running the install_desktop script then you now have the entire x windows system running as well as everything else it was doing before. Additionally, it will also have a full-screen browser running.

You might try looking for any plugins you installed which talk to the Internet like Anywhere or those which send messages or upload things to youtube. Check your octoprint.log to see if there are lots of error messages which suggest that something is trying to talk to the Internet and failing for some reason. A typical reason might be that DNS isn't properly working on the Pi as issued by your DHCP router.

I am running OctoPrint on a Raspberry Pi 3B. I am wondering if all of the system resources may be used up. I believe it did install all of the desktop components including Chromium browser. I have a print job running right now, so I am unable to make any changes (or view anything on the browser). Is there a way to check CPU usage from TouchUI while the print job is running?

I have a Raspberry Pi 4 that I bought for another project, I may try running the system on it temporarily just to see if there is a difference.

Once the current job is done, I will see if I can get more info and post back here.

thanks for the help.

No.

Absolutely, try the Pi4B to test that. Just make sure you have its power adapter. If your TFT screen connects via an HDMI plug then note that the 4B has micro-sized HDMI connectors. If you do change out the Pi, note that your router may issue a different IP address and your ~/.ssh/known_hosts file might then need to be adjusted since the MAC address would be different for the hostname.

If your Pi won't respond to a ping command then you might check your router to verify that it hasn't issued a new IP address (DHCP short lease).

OK, print job finished, so I pulled out a 50 foot network cable so that I could temporarily test the existing system with a LAN connection. It works great with the hard-wired connection to the network. I did a top and the results show that there is plenty of memory and not much CPU utilization while printing. I think there may be another issue. Is there a way to check WiFi signal strength on the pi?

Here are the results of the top while printing:

top - 21:49:12 up 8 min,  1 user,  load average: 0.87, 0.40, 0.21
Tasks: 124 total,   1 running, 123 sleeping,   0 stopped,   0 zombie
%Cpu(s): 18.0 us,  1.6 sy,  0.0 ni, 79.4 id,  0.0 wa,  0.0 hi,  0.9 si,  0.0 st
MiB Mem :    926.1 total,    341.8 free,    262.8 used,    321.5 buff/cache
MiB Swap:    100.0 total,    100.0 free,      0.0 used.    580.5 avail Mem

Try

 sudo iwlist wlan0 scan | egrep "Cell|ESSID|Signal|Rates"

OK, I think I was able to run a signal strength test on the pi. The signal strength actually seems pretty good. I'm still not sure what is causing the issues when trying to connect to OctoPrint via wireless.

Address: 1X:FF:1X:FF:1X:FF
                    Quality=59/70  Signal level=-51 dBm
                    ESSID:"xxxxxx"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s

Thanks, I was just posting the results as you were posting. :slightly_smiling_face:

1 Like

You might try your signal test (watching the signal level) and then nuke something in your microwave oven like a mug of water, say. From what I understand 802.11b is in the same frequency as a microwave oven's EMF.

Running an ifconfig command on the Pi can also show network errors.

ifconfig wlan0
  wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.100  netmask 255.255.255.0  broadcast 192.168.0.255
        ether aa:bb:cc:11:22:33  txqueuelen 1000  (Ethernet)
        RX packets 7715  bytes 4948616 (4.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0                <- here
        TX packets 7356  bytes 4698015 (4.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 <- here
1 Like