SOLVED: (I keep the bellow in case it might be useful to someone)
- After a more -detailed look, I was able to identify the the root-cause of having the CPU peaks was the continuous re-start of the identified bellow services;
- The reason : The log folder ( in my case: /var/log/onlyoffice ) needs to be read-write accessible for the onlyoffice process user ( as defined in the systemd startup scripts) . In my case, for some reason, the /var/log/onlyoffice folder was wrongly owned by the nginx proxy.
Originally defined issue:
I noticed the following:
- the node javascript service of OnlyOffice Community server installation - the onlyofficeControlPanel.service, listed bellow, causes CPU peaks from e.g. 0 to 600% periodically, all the time .
onlyofficeControlPanel.service:
[Unit]
Description=ControlPanel Main
After=network.target syslog.target
[Service]
Environment=“NODE_ENV=production”
Environment=“NODE_TLS_REJECT_UNAUTHORIZED=0”
Type=simple
ExecStart=/usr/bin/node /var/www/onlyoffice/controlpanel/www/server.js
Environment=NODE_OPTIONS=–dns-result-order=ipv4first
User=onlyoffice
Group=onlyoffice
Give up if ping don’t get an answer
TimeoutStartSec=600
TimeoutStopSec=5
Auto-Restart every 24 hours
WatchdogSec=24h
Restart=on-failure
PrivateTmp=false
[Install]
WantedBy=multi-user.target
It looks to me that the service is failing to access some specific server-side path/service, as defined within the /var/www/onlyoffice/controlpanel/www/server.js
Its content is :
const log = require(‘./app/log.js’);
const app = require(‘./app’);
const config = require(‘./config’);
app.set(‘port’, config.get(‘port’) || 3000);
const server = app.listen(app.get(‘port’), function () {
log.info('Express server listening on port ’ + server.address().port);
});
I can see that the server.js script is dependent on other ones , e.g.
./app/log.js, ./config, …, thus, probably, the issue is somewhere there but have no good idea how to troubleshoot further…
( e.g. in the log section of log.js I see a referenceto ‘’ ’ web.controlpanel…log’, but such a file does not exist at all on the system…could be related to the issue…?
…Any suggestion is welcome !
My setup:
Community Server/Control Panel installed on Centos 9 linux , installed from rpms
onlyoffice-communityserver 12.7.1-679
onlyoffice-controlpanel 3.5.4-541
onlyoffice-documentserver 8.3.1-25
node - v16.20.2
NB. I noticed a similar issue (high-CPU peaks ) caused by e.g by the onlyoffice WebDav, onlyofficeUrlShortener, onlyofficeThumb, services ; In their systemd start scripts I noticed they required the existence of their own TMP files, which did not exist, e.g. /tmp/onlyofficeWebDav ; after I created them manually, under the onlyoffice user, these processes did not show anymore high CPU consumption