1.Would like to know what is the use of max_idle_connections parameter under postgresql and redis sections in loraserver.toml and lora-app-server.toml files.
2.Even if “max_idle_connection” is set as 0 in both files, receive data from end nodes is working fine without any issue, so what and when is this idle connection is used.
Could you please help me to understand this.
There is no correct answer to your question as it depends on your load, number of NS and AS instances and configuration of your databases. What the
max_idle_connection solves is that the AS / NS needs to re-initiate a new connection with the Redis and PostgreSQL database. Instead of disconnecting, it will just keep the connection open to be re-used.
On a low traffic network, this should not matter too much, but under high load a low
max_idle_connection will reduce the throughput as a lot of time is spent on handshakes with the databases.
On the other hand, when setting this value too high, you might reach the max connection limit of your databases (especially when running many NS and AS instances).
Thank you very much for your quick reply,
- Have 2 setup with us,
** In 1st setup have lora-gateway-bridge(3.3.0), lora-app-server(3.4.0) and loraserver(3.3.0), postgres(9.6.6) running*
** In 2nd setup, have lora-gateway-bridge(2.1.5), lora-app-server(0.14.1) and loraserver(0.22.0) postgres(9.6.6) running*
So for 1st setup, could able to configure Idle connections value through max_idle_connection parameter.
Would like to know how the max_idle_connection configuration is done in 2nd Setup LoRa Versions . Because in some case can able to see only 1 instance of NS and AS postgres idle running, sometimes there is 2 instance of NS and 2 instance of AS was running and in some cases 1 NS and 2 AS was running. What is causing all this combination in 2nd setup
Our Customer reported that in 2nd Setup, data was not received from one of the LoRa Node installed in field. Total nodes active was 16 in field. Is the observed behavior in 2nd Setup is the cause for this reception error ?
Could you please relpy for above query.
We also tried to change max_idle_connections to 5 in loraserver.toml and after restarting loraserver we saw 2 _ns idle instances running instead of 5, the change was not effected. Is this been hardcoded as 2 anywhere in source code.Let me know please.
Thank you in advance