Michael H wrote: > >> Could anybody point me in the right direction for setting the kernel >> parameter, max_stack_depth, to 10240 for database tuning? >> >> I have currently set it by running 'ulimit -s 10240' but this does not >> survive a reboot. > > Thanks for the response, I've been nosing around that file recently but > noted the first two lines; > > #This file sets the resource limits for the users logged in via PAM. > #It does not affect resource limits of the system services. > >> Look at the file /etc/security/limits.conf >> > I added these two lines to the end of the file > > * soft stack 12288 > * hard stack 12288 > > in an attempt to set the stack depth to 12MB so that I can configure > postgresql max_stack_depth = 10MB. > > I rebooted, ulimit -s shows 12288. > > When I restart my service (#It does not affect resource limits of the > system services.) becomes apparent. <snip> Well, a quick and dirty hack would be to add that as a script in /etc/rd.local (or whatever the appropriate place is for CentOS 7). mark