Limit of USB 2.0 is 480 Mb/s which is 60 MB/s and this is enough to process 5 UARTS on any standard baudrate. You must taky in account that bandwidth limit is only theoretical because USB overheat is significant. But I still think bandwidth limit is not and issue. I checked karnel driver and there are no limit mentioned. Driver is written in a generic way and it should work. Check lsusb that you have enumerated all 5 devices.
Have you tried FT4232 which can provide 4 UARTS (and it is designed to provide so much UARTs at parallel) instead of 4 indepndent chips? Something like this: https://cz.farnell.com/ftdi/ft4232h-mini-module/mod-usb-to-serial-fifo-ft4232h/dp/1697466
I regularly run automated test setups with more than 4 FTDI USB to serial adapters on a Pi without issue.
Two things I can think of which might be causing issues:
1. You can get "missing data" if more than one program is accessing the same serial port at the same time. I sometimes see this if I've left the serial terminal open and run a python script, the terminal and the Python script each get some of the bytes coming in but not all.
2. How certain are you it isn't an issue with the hubs? Are they powered, are the end devices bus or self powered?
Also try check output of kernel output for USB / FTDI related errors and warnings. You can print them using following command:
I'm currently experimenting with a setup where I install a lite version of Raspberry Pi OS on a Pi 4 (8GB version).
Installation (using NOOBS) and configuration for ssh was painless and so was installing some python3 libraries and utilities.
The problem I run into is the following: Using 2 4-port hubs, I'm trying to connect several (currently 5) FTDI cables. I wrote a simple python script to read the serial input and if any input was there, pass it on over mqtt to a server (in local network. )
The thing is, this appears to work for 4 channels (FTDI cables) but as I add a second hub with the 5th channel, serial data goes 'missing'. (isn't passed on properly). Each channel has its own identical but separate python serial to mqtt process.
The processor and memory are basically idleing, so I can't imagine there should be a limit there.
In recent past, I've tried this setup with a Pi 3, and ran into the same problem. Figuring it had to do with the very limited bridge between CPU and USB / network, I upgraded to the Pi 4 that should have a different architecture (solving the limit)
But even so: These serial connections aren't passing actually a lot of data (we're talking KB's per minute.)
I was wondering: could there be some cap / limit on serial / USB interfaces in the software (kernel)? During these 'missing data' periods, the device doesn't actually disconnect (or show any other error) according to dmesg.