Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Huiying
Partner - Creator III
Partner - Creator III

why it is not good if max_connection is too high?

I found below information. For dedicated postgreSQL server, assuming the consumed RAM in below picture means the RAM in postgreSQL server, then we just need to ensure that the server has enough RAM? Is there any other downside when giving high number of max_connection?
Besides, isn't max_connection the upper limit? Will QS use all connections if the number is bigger than number of nodes*150?
Our use case, we will use script to ramp up new clusters.  In the script, we plan to define max_connection as 12nodes * 150, even we only install 3 nodes in the cluster.
Will there be any trouble to do so?

Huiying_1-1606901834161.png

 

Best regards,
Susan

Labels (1)
1 Solution

Accepted Solutions
Levi_Turner
Employee
Employee

For dedicated postgreSQL server, assuming the consumed RAM in below picture means the RAM in postgreSQL server, then we just need to ensure that the server has enough RAM?

Yep.

Is there any other downside when giving high number of max_connection?

Broadly, no. The folks in Support will have more reps on failure points, but from my vantage point there's not really a downside. If Qlik needs to query PostgreSQL, it needs to query PostgreSQL. You don't want PostgreSQL to be a bottleneck here.

> Besides, isn't max_connection the upper limit?

It's the upper bound on the number of open connections which are permitted from the PostgreSQL side.

> Will QS use all connections if the number is bigger than number of nodes*150?

Qlik Sense will use connections as needed and should tear them down when done. To take an obscure example from many years ago, when you open an app with an extension, Qlik Sense will query PostgreSQL to see if the file extensions being invoked (e.g. CSS, JS, PNG, etc) are permitted. These queries are done, information returned, and connection closed in a matter of milliseconds.

> Our use case, we will use script to ramp up new clusters. In the script, we plan to define max_connection as 12nodes * 150, even we only install 3 nodes in the cluster. Will there be any trouble to do so?

I am not aware of any concerns here. I certainly have not heard of leaks of connections to PostgreSQL in Qlik Sense but if it leaks up to 100 connections or 1,0000, there will still be a failure point. You're just widening the window of stability. So from my standpoint there isn't a downside to over-sizing the number of permitted connections.

View solution in original post

2 Replies
Huiying
Partner - Creator III
Partner - Creator III
Author

@Levi_Turner  Do you have time to give your opinion? 🙂

Levi_Turner
Employee
Employee

For dedicated postgreSQL server, assuming the consumed RAM in below picture means the RAM in postgreSQL server, then we just need to ensure that the server has enough RAM?

Yep.

Is there any other downside when giving high number of max_connection?

Broadly, no. The folks in Support will have more reps on failure points, but from my vantage point there's not really a downside. If Qlik needs to query PostgreSQL, it needs to query PostgreSQL. You don't want PostgreSQL to be a bottleneck here.

> Besides, isn't max_connection the upper limit?

It's the upper bound on the number of open connections which are permitted from the PostgreSQL side.

> Will QS use all connections if the number is bigger than number of nodes*150?

Qlik Sense will use connections as needed and should tear them down when done. To take an obscure example from many years ago, when you open an app with an extension, Qlik Sense will query PostgreSQL to see if the file extensions being invoked (e.g. CSS, JS, PNG, etc) are permitted. These queries are done, information returned, and connection closed in a matter of milliseconds.

> Our use case, we will use script to ramp up new clusters. In the script, we plan to define max_connection as 12nodes * 150, even we only install 3 nodes in the cluster. Will there be any trouble to do so?

I am not aware of any concerns here. I certainly have not heard of leaks of connections to PostgreSQL in Qlik Sense but if it leaks up to 100 connections or 1,0000, there will still be a failure point. You're just widening the window of stability. So from my standpoint there isn't a downside to over-sizing the number of permitted connections.