Failing to serve multiple concurrent device connection

Hi there,
Im running into issues with multiuser uses of kolibri.

My server machine is:
Intel NUC6CAYH with 4GB DDR4 Memory and 1TB HDD running Linux mint 18.3 64bit and the latest release of Kolibri (0.10.2)
My client device is:
Amazon Fire HD8(2017) (25pcs) updated.
My Router is:
TP-Link WR940N 450Mbps 2.4Ghz

When all 25 devices connect to kolibri same time it slows down dramatically rendering the server unresponsive to the devices. It takes almost 8-10 minutes for all the devices to load a single page. And at times says connection to the server is dropped.

For science, we did some more digging.
Next step we tried replacing the server with windows machine and no luck.
Then we tried connecting all devices to the Internet using the same router and each devices got decent speed browsing the Internet.

So my conclusion is kolibri is having issues with concurrent multi-user. Though i have seen in the forum that Kolibri is serving thousands of concurrent user in a setup in Africa.
So is there anything wrong in my setup. Please need your feedback ASAP.

Last year i ran into similar issues with KALite and some config in the ngnix provided by you did the trick. Hope there could be some neat trick like that for kolibri.

1 Like

Just wanted to give an update that i tried this fix

http://community.learningequality.org/t/kolibri-v0-10-has-been-released/716/3

but nothing improved.

I also tried to determine how many concurrent user can be served.
What i found is if there is less than 10 devices, everything works.
Then with 15 devices it is workable with delays.
But when tried to connect 20 or more devices everything falls apart.

Hello, looking at your setup I think the problem is not in Kolibri but in the network setup. I think that kind of router can’t work properly with so many connections. It would be nice if you could do these tests:

  1. Test a Kolibri version <=0.9.1 to check if this is a regression or a permanent problem.
  2. Connect the server to the router using a cable

There are nginx configs to be used with kolibri, in fact they are needed for big installations, but 15 devices should work without needing it with the server setup you are describing.
José L.

We found the same kind of problem with KALite. It is a network issue. We are using windows machines with the same TP Link router that you have. We added another router into the network, and that relieved the congestion. You setup the second router with a different SSID and different network subnet. Then you cable from the Internet (WAN) port of the new router to one of the LAN or Intranet of your first router where you also plug in your server.

Hope that helps.

@jredrejo Thanks for the reply.

Today i did follow up with your suggestion and got much better result using Kolibri 0.9.1.
When connected all 25 devices it does quite slow down but it doesn’t become unresponsive like before. All device can load up any page given few minutes which is not ideal for a real classroom use.
N.B. i did use cable connection between server and router in all the scenario.

I understand what you are saying and i did say

So, i didn’t try to use multiple router like u suggested for this setup because i think that is not a logical solution for such a small scale setup.However i tried using two other router Netgear JR6150 and Tenda F9 in the same setup but the results were similar to my previous scenario.

It seems clearly that some of the server parameters that were changed in the newest versions of Kolibri have had a negative impact in your setup.
You said in a previous comment that you tried to do what I suggested at Kolibri v0.10 has been released! without success. I am giving you now the parameters to set in the options.ini file that’s in that directory to have exactly the same setup version <=0.9.1 had.

[Server]
CHERRYPY_THREAD_POOL = 10
CHERRYPY_SOCKET_TIMEOUT = 10
CHERRYPY_QUEUE_SIZE = -1
CHERRYPY_QUEUE_TIMEOUT = 10

As you said, using this setup everything should work slower, but with so few users will work unless you have a lot of requests. I would like to know why the current setup does not work properly for you. Many tests have been made before fine tuning this parameters to avoid this kind of problems.

In any case, please, if possible, try to connect always the server to the router using a cable, not wifi. Wifi is fine for the clients (that explains why you have a decent speed browsing Internet), but not for the server that supports most of the traffic.

Please, give us some feedback on the results of this change.

1 Like

@jredrejo, Hello again.
Well i think i’ve got the latest release of Kolibri working for my setup.
Last few days i’ve been back and forth with different version and changing values of the parameter you provided.
For 0.10.2 setting CHERRYPY_THREAD_POOL = 10 doesn’t improve much but when i raised it to 50 it worked well. All the client devices was getting good load time. Though i did try with value 20 and 30 and it was still relatively slow. So cranked it up to 50. However i didn’t change any other values.
Hope this helps others who is facing similar issues.
[edit] Btw options.ini file wasn’t available in the kolibri directory by default, so i created the file and inserted the parameters.

Finally, Thank you for helping me in solving my issues.

2 Likes

hi , thanks for your feedback. Great to know your problems are solved.

Just for the record, in case someone else read these comments: a pool of 50 threads is not for everyone, it will require a medium-good server and will spend most of its resources so the machine can’t perform well doing other tasks at the same time. If you are using a dedicated server for Kolibri it’s fine.

Where can the pool thread be changed on a windows 10 machine?

Hello, it’s explained in my first answer in this thread.
It does not depend on the Operative System. The only difference between using Windows or Linux is the path to the place where the .kolibri folder is created.
If you don’t know where it’s that folder, you can open Kolibri in your browser and go to the Device menu. There you can find an “Info” tab, clicking on it you will see the path to your database. The file options.ini is in that same folder (if it does not exist, you will have to create it)

Regards