Key update hunging in "Saving" status

Steps to reproduce
1.
2.
3.

Expected behaviour
I guess key should get updated and I should be able to see my encrypted file with my previous ke
y
Actual behaviour
Page hanging in "Saving" status during the key update
Server configuration
Operating system:Debian 8.5
Web server:nginx
Database:sqlite
PHP version:5.5
ownCloud version (see ownCloud admin page):9.1
Updated from an older ownCloud or fresh install:
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):

    root@iPig:/var/log/nginx# tail error.log 
    #4 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
    #5 /v...
    PHP message: PHP Fatal error:  Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [14] unable to open database file' in /var/www/owncloud/lib/private/DB/Connection.php:58
    Stack trace:
    #0 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(973): OC\DB\Connection->connect()
    #1 /var/www/owncloud/lib/private/DB/Connection.php(209): Doctrine\DBAL\Connection->executeUpdate('PRAGMA read_unc...', Array, Array)
    #2 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): OC\DB\Connection->executeUpdate('PRAGMA read_unc...')
    #3 /var/www/owncloud/lib/private/DB/Connection.php(141): Doctrine\DBAL\Connection->setTransactionIsolation(2)
    #4 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DB
    2016/09/14 23:20:10 [error] 30687#0: *23 FastCGI sent in stderr: "PHP message: creating sqlite db" while reading response header from upstream, client: 172.16.0.3, server: 172.16.0.254, request: "POST /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "172.16.0.254"

root@iPig:/var/log# tail php5-fpm.log 
[15-Sep-2016 18:53:12] NOTICE: fpm is running, pid 11822
[15-Sep-2016 18:53:12] NOTICE: ready to handle connections
[15-Sep-2016 18:53:12] NOTICE: systemd monitor interval set to 10000ms
[15-Sep-2016 18:54:21] NOTICE: Terminating ...
[15-Sep-2016 18:54:21] NOTICE: exiting, bye-bye!
[15-Sep-2016 18:54:21] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful

[15-Sep-2016 18:54:21] NOTICE: fpm is running, pid 11848
[15-Sep-2016 18:54:21] NOTICE: ready to handle connections
[15-Sep-2016 18:54:21] NOTICE: systemd monitor interval set to 10000ms

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):

Integrity status for oC9+

Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.

Hi,

seems you have some issues with your SQLite database. A sane thing what you should do is to convert your database to a real database like MySQL or PostgreSQL (especially when using encryption). The needed steps are documented here:

https://doc.owncloud.org/server/9.1/admin_manual/configuration_database/db_conversion.html

Before enabling encryption please also read and understand this:

Encryption keys are stored only on the ownCloud server, eliminating exposure of your data to third-party storage providers. The encryption app does not protect your data if your ownCloud server is compromised, and it does not prevent ownCloud administrators from reading user’s files. This would require client-side encryption, which this app does not provide. If your ownCloud server is not connected to any external storage services then it is better to use other encryption tools, such as file-level or whole-disk encryption.

from https://doc.owncloud.org/server/9.1/admin_manual/configuration_files/encryption_configuration.html

mmm...I can do it but, is it going to fix the problem? I think that in this way I'm not going to recover my files

Revert to your backup before you have updated the keys, migrate to MySQL and optionally disable encryption afterwards if you don't use external storages like Dropbox.