Thank you for such a powerful tool! I am fascinated by your work and really excited to use n8n for work and teaching.
I started teaching my students to build Telegram chatbots using n8n (self-hosted on DigitalOcean, I added 30 students as users to the instance) and during the first class there were some issues: when students tried to test their workflows for the first time (added their own Telegram bot credentials, made a trigger, clicked on “Test workflow” and then performed an action on the bot) - nothing happened for most of them (me included). Everything was connected and made correctly – the system just did not see the actions performed in their bots (it was just “listening” and when you clicked “Stop” it won’t stop) and then occasionally it worked for them later at different times.
Then at some point during the class a message from n8n “Too many requests” appeared to some of the students. Also, from time to time actions added to canvas were disappearing (seems that sometimes there were troubles with saving changes).
I did not think that 30 people working simultaneously in one single instance was a big pressure on the system, so I would like to ask for your thoughts on this. Can this instability be caused by n8n settings (I did not change EXECUTIONS_PROCESS and did not find this setting in .env or docker-compose.yml) or server default settings?
Note that students were accessing the server from the same class, network and IP.
I browsed the web for different possible solutions, found info about sysctl.conf and iptools but not sure if that is the direction I should explore.
Will really appreciate your help or ideas!
Information on your n8n setup
n8n version: 1.42.1
Database: SQLite
n8n EXECUTIONS_PROCESS setting – I did not select or change it during the installation
Running n8n via Docker Compose (DigitalOcean droplet with Docker 25.0.3, 4 GB memory, 35 GB disk)
Yes, each of them created their own bot in BotFather and added that credential using private API keys.
Also, we performed only the very basic stuff: added the Telegram triggers and just tried to test it, even without any action nodes). Approx. 30 people simultaneously. No other automations were active in that instance at that point. It doesn’t seem to be a problem with resources…
Just to make sure we are OK with resources and set up.
Can you share your set up?
So what the resources are and how you have set up n8n. Database etc.
Ah sorry I see you have it in your first post.
So using SQLite is going to be one of the issues here I think. As 30 concurrent users making changes and stuff is going to be too much for SQLite I think.
Thank you for a suggestion, I have moved to PostgreSQL now, hope that will help.
Do you think I should also switch on the queue/workers mode? Or that is not needed for now?
That wouldnt change anything for the UI. Only if things run in the background.
So it depends on those bots you are building. Are they live flows? Then it would help.
I have implemented PostgreSQL and it seems to work a little better, but I have just finished another class and the problem still arouse from time to time. What happened: when I show them a simple flow (e.g., Telegram trigger + Telegram Send a text message) and then click on Test workflow and send a test message to my bot – it all works for me.
But then all my students (around 30 people simultaneously) try to do the same and this works only for some of them. The rest see the “Listening for Telegram action” thing which does not trigger when they write to their bots. It seems to be stuck in that “listening” mode.
Also, when all people were trying to log in into the system some of them were getting “Too many requests” notification from n8n.
So I am trying to figure it out, what else can I do to make this work for 30 people during a class.
Can it be connected to caddy settings somehow?
I have flush_interval set to -1 in Caddyfile
Ah yes, so you are running it manual mode. When using the front-end listen option all is done on the main instance even if you set up queue mode.
So I can understand it not liking that for 30 people.
The test/listen/manual mode is for development, and I have never tried to do that with 30 on one instance. Don’t really think n8n is made for that.
I would set up queue mode and let my students activate the flows to make sure workers are used in the background. To spread the load a bit.
30 bots with webhooks coming in should not be too bad so I think you will not need any webhook processors/workers.
But too be honest I have no experience with your usecase. So we would need to wait for someone to respond that knows a bit more to help you out.