New Session Rejected Due to Limit

Moderator: NorbertKrupa

Post Reply
User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

New Session Rejected Due to Limit

Post by JimKnicely » Thu Feb 02, 2012 10:36 pm

A co-worker asked me about this message at work, so I thought I'd post it on the web site.

The "New Session Rejected Due to Limit" error is the result of too many client session requests. By default Vertica allows 50 client sessions plus 5 more sessions for the administrators. You can resolve this issue by increasing the value of the MaxClientSessions database parameter.

So, for example, if I want to allow 60 sessions, then I would execute the following command:

Code: Select all

SELECT SET_CONFIG_PARAMETER('MaxClientSessions', 60);
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

rajasekhart
Intermediate
Intermediate
Posts: 87
Joined: Wed Apr 25, 2012 8:10 am

Re: New Session Rejected Due to Limit

Post by rajasekhart » Thu May 17, 2012 6:08 am

Hi nicely,

i set the MaxClientSessions parameter to 100

Eg:
SELECT SET_CONFIG_PARAMETER('MaxClientSessions', 100);

It worked fine.

What are the maximum number of allowable sessions?
Is there any problem with the increasing the maximum client sessions?

Thanks,
Raj.
Rajasekhar.T|HP ATP Vertica Big Data Solutions V1

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: New Session Rejected Due to Limit

Post by id10t » Thu May 17, 2012 7:30 am

What are the maximum number of allowable sessions?
session = socket. In Linux/Unix socket is a file so it depends how much opened file descriptors can be opened.

/proc/sys/fs/file-max
This specifies the maximum number of file handles that can be allocated. You may need to increase this value if
users get error messages stating that they cannot open more files because the maximum number of open files
has been reached. This can be set to any number of files and can be changed by writing a new numeric value
to the file.

/proc/sys/fs/file-nr
This file is related to file-max and holds three values:
Number of allocated file handles
Number of used file handles
Maximum number of file handles

For info and configs look at:

Code: Select all

ulimit -a   #Provides  control  over  the resources available to the shell and to processes started by it, on systems that allow such control.

Code: Select all

sysctl -a  # configure kernel parameters at runtime 
Is there any problem with the increasing the maximum client sessions?
Open connection/socket costs to system resources (open FD, create buffer an so on) so it depends on your system.

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: New Session Rejected Due to Limit

Post by JimKnicely » Thu May 17, 2012 12:55 pm

We can try to set the MaxClientSessions parameter to in Vertica 5.1.1 to a number as high as 9,223,372,036,854,775,807!

Code: Select all

dbadmin=> SELECT SET_CONFIG_PARAMETER('MaxClientSessions', 9223372036854775807);
    SET_CONFIG_PARAMETER
----------------------------
 Parameter set successfully
(1 row)

dbadmin=> SELECT SET_CONFIG_PARAMETER('MaxClientSessions', 9223372036854775808);
ERROR:  function SET_CONFIG_PARAMETER("unknown", numeric) does not exist, or permission is denied for SET_CONFIG_PARAMETER("unknown", numeric)
HINT:  No function matches the given name and argument types. You may need to add explicit type casts.
But Vertica appears to max out at 4,294,967,295...

Code: Select all

dbadmin=> SELECT GET_CONFIG_PARAMETER('MaxClientSessions');
 GET_CONFIG_PARAMETER
----------------------
 4294967295
(1 row)
But in the real world this number is slightly impractical :)
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: New Session Rejected Due to Limit

Post by JimKnicely » Thu May 17, 2012 7:55 pm

Update: Don't set the MaxClientSessions = 4294967295; you won't be able to log in anymore :(

Code: Select all

dbadmin=> select * from configuration_parameters where parameter_name = 'MaxClientSessions';
-[ RECORD 1 ]-----------------+---------------------------------------------------------------------------------
node_name                     | ALL
parameter_name                | MaxClientSessions
current_value                 | 4294967295
default_value                 | 50
change_under_support_guidance | f
change_requires_restart       | f
description                   | Maximum number of client sessions; in addition five dbadmin sessions are allowed

verticatst02:/root $ vsql -h 10.255.16.126 -U cognos -w xxxxx
vsql: FATAL:  New session rejected due to limit, already 1 sessions active
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “New to Vertica Database Development”