Error from Spine poller: PHP Script Server communications lost. Restarting PHP Script Server
If you receive an error from the Spine poller, indicating that communication with the PHP Script Server has been lost and will restart, try the following actions to prevent this error.
Procedure
- Try increasing the Script and Script Server timeout value
in the Console > Configuration > Settings > Poller tab.
Note: Spine creates many more MySQL server connections than cmd.php due to its parallelism. To calculate the number of Spine connections to MySQL do the following, assuming that you configured Spine like this:
- Maximum Concurrent Poller Processes = 16
- Maximum Threads per Process = 10
- Number of PHP Script Servers = 5
Connections = 16 x ( 1 + 10 + 5 ) = 256
The 1 is there for Cacti's main poller, poller.php, which will always take one connection. You must allow enough connections in MySQL configuration file /etc/my.cnf for Spine as well as for RTM users. In the preceding example, setting the parameter max_connections in my.cnf to 300+ would be appropriate. - Run Spine manually to see the output at the command line.
For example:
- Run Spine in read-only mode and send output to stdout.
./spine -R -S
- To increase verbosity of Spine, use the -V flag like
this
./spine -R -S -V 3
- To get a full list of Spine command line options run
with --help flag
./spine --help Usage: spine [options] [[firstid lastid] || [-H/--hostlist='hostid1,hostid2,...,hostidn']] Options: -h/--help Show this brief help listing -f/--first=X Start polling with host id X -l/--last=X End polling with host id X -H/--hostlist=X Poll the list of host ids, separated by comma's -p/--poller=X Set the poller id to X -C/--conf=F Read spine configuration from file F -O/--option=S:V Override DB settings 'set' with value 'V' -R/--readonly Spine will not write output to the DB -S/--stdout Logging is performed to standard output -V/--verbosity=V Set logging verbosity to <V> --snmponly Only do SNMP polling: no scripts
- Run Spine in read-only mode and send output to stdout.