Page 1 of 1

Adjusting max_stack_depth

Posted: Wed Feb 14, 2018 1:13 pm
by maoreyes76
Hi ...


Today our disk space for / went out and we found this in one of the logs files that growed rapidly:

<p><pre>SQL Error [nagiosxi] : ERROR: stack depth limit exceeded
HINT: Increase the configuration parameter "max_stack_depth", after ensuring the platform's stack depth limit is adequate.</pre></p>
DELETED LOCKFILE '/usr/local/nagiosxi/var/event_handler.lock'
EVENT HANDLER EXITING
LOCKFILE '/usr/local/nagiosxi/var/event_handler.lock' CREATED
Array

What is best practice regarding increasing the size of max_stack_depth?

And a another question how can we empty the outgoing mail que? After the problem we had with the disk we had some network errors with lots of alerts and now it sends out notification the whole time, i think it is cached up mails, but I dont how to empty it

Re: Adjusting max_stack_depth

Posted: Wed Feb 14, 2018 3:27 pm
by npolovenko
Hello, @maoreyes76. Usually, max_stack_depth doesn't need to be modified. And since you ran out of space recently I'd wait to see if you get similar errors after increasing the disk space. But if you choose to increase it, this documentation: https://www.postgresql.org/docs/9.1/sta ... ource.html
Says you need to run this command

Code: Select all

ulimit -s
And use that value - 1 megabyte.

As far as mail, use this command if you still have messages in the queue:

Code: Select all

mailq
And this command should clear out the queue:

Code: Select all

sendmail -q
However, this will only work if you use a default postfix email in XI. If you have some custom email settings that might not work.

Re: Adjusting max_stack_depth

Posted: Fri Feb 16, 2018 10:15 am
by maoreyes76
Hi Npolovenko...

Thank you for your Reply, it has stabilized and I will wait and see if it happens again.

Re: Adjusting max_stack_depth

Posted: Fri Feb 16, 2018 2:37 pm
by npolovenko
@maoreyes76, Sounds good.