Closed m-boyd closed 7 years ago
Please give your PHP more than 8 Mb of Memory ;)
You can do this in whatever php.ini is used for console commands (check your distro's documentation)
@BernhardPosselt I've checked memory limits in Apache web server (dependency for Nextcloud 11 from QNAP Club) as well as in the system web server and both are configured higher than 8 MB.
Well the exception says that it tried to allocate memory above the maximum allowed value of 8 Mb. That's all I can tell you
Just realized that I should have been paying attention to the php.ini file in /opt/etc/. However, I now receive this error:
[~] # nextcloud-news-updater --loglevel info /share/Web/nextcloud
2017-01-10 11:55:14,163 - Nextcloud News Updater - INFO - Running update in an interval of 900 seconds using 10 threads
2017-01-10 11:55:14,163 - Nextcloud News Updater - INFO - Running before update command: php -f /share/Web/nextcloud/occ news:updater:before-update
2017-01-10 11:55:15,552 - Nextcloud News Updater - ERROR - Command '['php', '-f', '/share/Web/nextcloud/occ', 'news:updater:before-update']' returned non-zero exit status 1: Trying again in 30 seconds
Traceback (most recent call last):
File "/opt/lib/python3.5/site-packages/nextcloud_news_updater/api/updater.py", line 69, in run
self.before_update()
File "/opt/lib/python3.5/site-packages/nextcloud_news_updater/api/cli.py", line 73, in before_update
self.cli.run(self.api.before_cleanup_command)
File "/opt/lib/python3.5/site-packages/nextcloud_news_updater/api/cli.py", line 12, in run
return check_output(commands)
File "/opt/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout
File "/opt/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['php', '-f', '/share/Web/nextcloud/occ', 'news:updater:before-update']' returned non-zero exit status 1
Any ideas?
Check your logs and run the command manually:
['php', '-f', '/share/Web/nextcloud/occ', 'news:updater:before-update'] translates to
php -f /share/Web/nextcloud/occ news:updater:before-update
[~] # php -f /share/Web/nextcloud/occ news:updater:before-update
Console has to be executed with the user that owns the file config/config.php
Current user: admin
Owner of config.php: httpdusr
Try adding 'sudo -u httpdusr ' to the beginning of the command (without the single quotes)
[~] # sudo -u httpdusr php -f /share/Web/nextcloud/occ news:updater:before-update
{"reqId":"dL+5234\/Tt4X6PlvQhmx","remoteAddr":"","app":"no app in context","message":"Temporary directory \/opt\/tmp is not present or writable","level":2,"time":"2017-01-10T18:22:19+00:00","method":"--","url":"--","user":"--","version":"11.0.0.10”}
Well here's your issue: Temporary directory \/opt\/tmp is not present or writable
chown (try google)
[~] # chown -R httpdusr:administrators /opt/tmp/
[~] # sudo -u httpdusr nextcloud-news-updater /share/Web/nextcloud
ok cool, now only run the updater using the same user and group
Check the readme for a setup using systemd for instance
OS: QTS 4.3.2.0050 (QNAP official beta) PHP: 5.6.29 (cli) (OPKG) Nextcloud: 11.0.0 (QNAP Club)
Strange because
memory_limit = 128M
in php.ini. From here I terminated the process and received the following:Any assistance is appreciated!