Error: API failure: Syck parser syntax error
Hello,
When I go to MultiPHP Manager I get the following error (and no list of domains / PHP versions):
Error: API failure: Syck parser (line 9, column -1): syntax error at /usr/local/cpanel/Cpanel/YAML.pm line 68.
Any idea what's gone wrong and how I fix it?
Thanks,
Shaun
-
From /usr/local/cpanel/logs/error_log: [2017-08-17 11:52:01 +0100] info [xml-api] API failure: Syck parser (line 9, column 0): syntax error at /usr/local/cpanel/Cpanel/YAML.pm line 68. [php_get_vhost_versions] version [1]. 0 -
Hello, The error messages suggests one of your PHP-FPM YAML files is invalid or corrupt. Have you made manual changes to any PHP-FPM YAML files associated with an account? If not, try running the following command: /scripts/php_fpm_config --rebuild
The "Syck parser (line 3, column 11)" error message will appear on the next line after the check for the domain name with the corrupted YAML file. Once you find the affected domain name, you could move the invalid file out of the way with a command such as:mv -v /var/cpanel/userdata/username/domain.tld.php-fpm.yaml /root/
Then, browse to "WHM >> MultiPHP Manager" and re-enable PHP-FPM for the domain name to ensure the file is rebuilt. Once you confirm it's working well, you can remove the domain.tld.php-fpm.yaml file that was moved to the /root directory. Thank you.0 -
Hello, The error messages suggests one of your PHP-FPM YAML files is invalid or corrupt. Have you made manual changes to any PHP-FPM YAML files associated with an account?
Thanks Michael, Yes, I've made manual changes to all of them, to add:request_terminate_timeout = 300
... because I was getting a lot of errors due to early process termination. I've also edited some to individually tweak the start/min_max spare/children etc. as one or two of the sites need much more resources than others. Cheers, Shaun0 -
Hello, Could you use the steps in my last response to determine which YAML file is corrupted, and then let us know the contents of the corrupted file? Thank you. 0 -
Sorry Michael, I tried to edit my last post but it told me it was "spammy"? I haven't edited any of the YAML files - I've edited the .conf files in: /opt/cpanel/ea-php70/root/etc/php-fpm.d Anyway, I ran the rebuild script and it failed on [removed-domain] Kind regards, Shaun 0 -
Anyway, I ran the rebuild script and it failed on [removed-domain]
Could you follow the earlier instructions for removing the YAML file for that domain name and verify if it solves the issue? Thank you.0 -
I've tried, it brings up different domains each time - I move them and it fails on others - I move those, and it fails on the ones I previously moved. :confused: 0 -
Great - now it's deleted all the customisations I made to the conf files in /opt/cpanel/ea-php70/root/etc/php-fpm.d 0 -
Hello, You can restore the previous YAML files by moving them back from the /root/ directory to the /var/cpanel/userdata/$username/ directory. Since that did not help solve the issue, could you open a support ticket using the link in my signature so we can take a closer look? Thank you. 0 -
It has deleted all of the .conf files in /opt/cpanel/ea-php70/root/etc/php-fpm.d/ directory - where I'd spent quite a bit of time tweaking the individual site php-fpm settings. :mad: I'll start a ticket. Thanks for your assistance. 0 -
It has deleted all of the .conf files in /opt/cpanel/ea-php70/root/etc/php-fpm.d/ directory - where I'd spent quite a bit of time tweaking the individual site php-fpm settings.
Hello, Keep in mind that directly editing those configuration files is unsupported. Instead, you'd need to edit the YAML files to ensure the changes are preserved. This is documented at: PHP-FPM and EasyApache 4 - Documentation - cPanel Documentation Additionally, you may find this thread helpful: SOLVED - Stop cPanel from overwriting php-fpm settings file. Regarding the issue with "WHM >> MultiPHP Manager", feel free to post the ticket number here and we can update this thread with the outcome. Thank you.0 -
Ticket submitted: 8796917 0 -
Ah, okay, I see - so I've been editing the wrong files and should have added the changes to the .yaml file for the domain. Noted, along with the instructions - thanks. :) 0 -
Just out of interest - if I wanted to make the timeout a default part of all future domain PHP-FPM configurations, is there a sort of "Master" file that is used as a template that I could add it to? 0 -
Just out of interest - if I wanted to make the timeout a default part of all future domain PHP-FPM configurations, is there a sort of "Master" file that is used as a template that I could add it to?
Yes, this is possible. Here's a thread with instructions on how to do this: PHP-FPM - Default Settings I also encourage you to vote for the following feature request to allow for an easier method of making these types of changes: PHP-FPM Enhanced Configuration Thank you.0 -
Thanks, I've voted. I'm coming to WHM/cPanel after a decade of Debian and editing things manually - so I am not used to (and somewhat frustrated by) the way in which changes can be easily, and for me, unknowingly overwritten from the panel. Lots to learn and I suppose it's better I do it with a handful of domains than a year later with hundreds!! ;) 0 -
FIXED: I had made an incorrect entry in: /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml I had used = for the timeout when I should have used : Thanks for sorting. :-D 0
Please sign in to leave a comment.
Comments
17 comments