Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
puppet-freeradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Projets publics
puppet-freeradius
Commits
fa4f7611
Commit
fa4f7611
authored
10 years ago
by
Jonathan Gazeley
Browse files
Options
Downloads
Patches
Plain Diff
Add support to freeradius::sql to customise socket lifetimes
parent
92020da1
Branches
Branches containing commit
Tags
3.0.3
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+10
-0
10 additions, 0 deletions
README.md
manifests/sql.pp
+2
-0
2 additions, 0 deletions
manifests/sql.pp
templates/sql.conf.erb
+2
-2
2 additions, 2 deletions
templates/sql.conf.erb
with
14 additions
and
2 deletions
README.md
+
10
−
0
View file @
fa4f7611
...
...
@@ -328,6 +328,16 @@ you will see errors like "No connections available and at max connection limit".
this to MORE than the number of threads means that there are more connections than necessary.
Leave blank to set it to the same value as the number of threads.
##### `lifetime`
Default:
`0`
. Lifetime of an SQL socket. If you are having network issues such as TCP sessions expiring, you may need to set the socket
lifetime. If set to non-zero, any open connections will be closed
`$lifetime`
seconds after they were first opened.
##### `max_queries`
Default:
`0`
. Maximum number of queries used by an SQL socket. If you are having issues with SQL sockets lasting "too long", you can
limit the number of queries performed over one socket. After
`$max_qeuries`
, the socket will be closed. Use 0 for "no limit".
##### `query_file`
Default:
`sql/${database}/dialup.conf`
. Relative path to the file which contains your SQL queries. By
...
...
This diff is collapsed.
Click to expand it.
manifests/sql.pp
+
2
−
0
View file @
fa4f7611
...
...
@@ -7,6 +7,8 @@ define freeradius::sql (
$radius_db
=
'radius'
,
$num_sql_socks
=
'${thread[pool].max_servers}'
,
$query_file
=
'sql/${database}/dialup.conf'
,
$lifetime
=
'0'
,
$max_queries
=
'0'
,
$ensure
=
present
,
)
{
$fr_package
=
$::freeradius::params::fr_package
...
...
This diff is collapsed.
Click to expand it.
templates/sql.conf.erb
+
2
−
2
View file @
fa4f7611
...
...
@@ -92,13 +92,13 @@ sql {
# such as TCP sessions expiring, you may need to set the socket
# lifetime. If set to non-zero, any open connections will be
# closed "lifetime" seconds after they were first opened.
lifetime =
0
lifetime =
<%=
@lifetime
%>
# Maximum number of queries used by an SQL socket. If you are
# having issues with SQL sockets lasting "too long", you can
# limit the number of queries performed over one socket. After
# "max_qeuries", the socket will be closed. Use 0 for "no limit".
max_queries =
0
max_queries =
<%=
@max_queries
%>
# Set to 'yes' to read radius clients from the database ('nas' table)
# Clients will ONLY be read on server startup. For performance
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment