24 October, 2014

ownCloud stuck in upgrade?



That's what I saw today after trying to update Notes:


Not cool, that didn't seem to work too well. This can happen with third-party apps. But what to do? Just like with upgrades, you can call in the help of the occ command line tool which comes with ownCloud. Ideally, run it as user of your apache, something like this:
sudo -u wwwrun ./occ
It will give you an overview of what occ can do for you, looking something like this:
ownCloud version 7.0.2

Usage:
[options] command [arguments]

Options:
--help -h Display this help message.
--quiet -q Do not output any message.
--verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version -V Display this application version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
--no-interaction -n Do not ask any interactive question.


And a lot more.
From there, you can start an upgrade with:
sudo -u wwwrun ./occ upgrade
which is nice when the ownCloud upgrade process doesn't work. This can happen because php has a time-out set and if the amount of work takes longer than that timeout - it won't finish. Which can happen for example on very big installations, or on very light hardware (raspberry pi!).
But that wasn't my problem - things just got stuck in maintenance mode. And that is one of the options in the list: turn maintenance mode on and off! So I just proceeded (on advice of Arthur here in the office) to turn that off:
sudo -u wwwrun ./occ maintenance:mode --off
Lo and behold, it solved the problem for me.
If it doesn't, there is the maintenance:repair option which might fix the problem for you!

Tip: log rotation

In other news, I discovered that my owncloud.log file (to be found in your data folder) was 5.9 gigabytes big. Yeah, 6318901632 bytes. ownCloud can keep that file in check, but you have to enable that by adding the following to your config.php:
'log_rotate_size' => '100 MiB'
Of course, other values work, too. You can find this and more in config.sample.php, be sure to go over that file to see what you can and perhaps should configure. I personally would welcome any effort to give that file a user interface, or make it easier to reach - even with a text editor built into the admin UI... Although perhaps a more subtle approach of picking what should be visible or not would be better. In any case - anybody up for that?

No comments:

Post a Comment

Say something smart and be polite please!