Is there any way to keep my log from being filled with PUBLISH requests?

The default install of FreepBX 17 puts an /etc/stasis.conf file with all variables commented out. This is identical to:

asterisk/configs/samples/stasis.conf.sample at master · asterisk/asterisk

This file lacks the warning message:

 ;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications.                                                          ;
;--------------------------------------------------------------------------------;

It also is not a softlink to

/var/www/html/admin/modules/core/etc/stasis.conf

like the other FreePBX confg files are, therefore, it is available for editing.

Unfortunately, however, there does NOT appear to be any commands that show what the defaults the system used on boot. Since these are all commented out it would have gone to the default settings in the source code. I don’t have the source in front of me to look.

The commented out section says:

[threadpool]
;initial_size = 5          ; Initial size of the threadpool.
;                          ; 0 means the threadpool has no threads initially
;                          ; until a task needs a thread.
;idle_timeout_sec = 20     ; Number of seconds a thread should be idle before
;                          ; dying. 0 means threads never time out.
;max_size = 50             ; Maximum number of threads in the Stasis threadpool.
;                          ; 0 means no limit to the number of threads in the
;

by convention, the example commented out variables would normally be the same as the defaults in the source. But I do not know at this point if source was updated. So I am going to have to test this out on faith despite the warning:

" Don’t. Touch. This."

in this thread:

Task processor queue reached 500 - FreePBX / Integration - FreePBX Community Forums

My default install doing this:

/sbin/asterisk -rvvv
core set verbose 4
core set debug 4

pumps out many of the threadpool notices from time to time even if the system is doing nothing other than sitting there with a bunch of phones registered into it. Possibly those phones are sending garbage to Asterisk that is prodding it to emit these lines

AI seems to claim that commands:

threadpool show
threadpool show pjsip/default
threadpool show stasis-core

exist. However, when attempting to execute these commands I get an error. Possibly they might have existed in some past version of Asterisk or maybe they are a Copilot hallucination.

Issuing the commands

phony*CLI> core show ?
application     applications    calls           channel         channels        channeltype     channeltypes    codec           codecs
config          file            function        functions       hanguphandlers  help            hint            hints           image
license         profile         settings        sound           sounds          switches        sysinfo         taskprocessor   taskprocessors
threads         translation     uptime          version         warranty
phony*CLI> core show taskprocessor
No such command 'core show taskprocessor' (type 'core show help core show taskprocessor' for other possible commands)
phony*CLI>

is also disappointing since one of the commands “taskprocessor” that the help system claims exists - doesn’t exist, either.

Anyway, I took a baseline as best I could:

root@phony:/etc/asterisk# /sbin/asterisk -rx "core show taskprocessors" | grep stasis | wc
    497    2982   62622
root@phony:/etc/asterisk#

And, based on that, based on pure guesstimates, based on recommendations here:

Performance Tuning - Asterisk Documentation

I added:

initial_size = 20
max_size = 150

in stasis.conf and did a

/sbin/service asterisk stop
/sbin/service asterisk start

Now, a

core set verbose 4
core set debug

gives me the nice debugging output I wanted, without the spamming of the increasing threadpool size

Also, taskprocessors seem to have dropped as well.

root@phony:/etc/asterisk# /sbin/asterisk -rx "core show taskprocessors" | grep stasis | wc
    182    1092   22932
root@phony:/etc/asterisk#

I can only conclude the following:

due to code changes between older Asterisk versions, some of the compiled-in defaults are now too small. It also seems that some of the show commands have been possibly accidentally deleted.

I have to wonder if this is a bug?

Hopefully this will help others. Never assume defaults are the best in any software.