IOS app crashes server consistently

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 15.0.7.0
Operating system and version (eg, Ubuntu 17.04): whatever is in the docker image
Apache or nginx version (eg, Apache 2.4.25): whatever is in the docker image
PHP version (eg, 7.1): whatever is in the docker image

The issue you are facing:
When downloading or uploading files from the IOS app, my nextcloud server crashes and needs restarted. I’m using the latest IOS app 2.23.5.1

Is this the first time you’ve seen this error? (Y/N):
Yes

Steps to replicate it:

  1. Log into IOS app
  2. Download an item. This takes unusually long for something like a 200KB markdown file.
  3. After one item downloads, I try to download another and the server crashes.

OR

  1. Log into IOS app
  2. Upload an item
  3. Server crashes

The output of your Nextcloud log in Admin > Logging:

[webdav] Fatal: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE `file_locks` SET `lock` = `lock` + 1, `ttl` = ? WHERE `key` = ? AND `lock` >= 0' with params [1556799740, "files\/e350fc486c3b1c20f0e2ce0cf7bb3368"]:

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at <<closure>>

 0. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 128
    convertException("An exception oc ... n", Doctrine\DBAL\Dr ... ]})
 1. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1015
    driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "UPDATE `file_lo ... 0", {1: 1556799740,2 ... "})
 2. /var/www/html/lib/private/DB/Connection.php line 216
    executeUpdate("UPDATE `file_lo ... 0", [1556799740,"fil ... "], [])
 3. /var/www/html/lib/private/Lock/DBLockingProvider.php line 196
    executeUpdate("UPDATE `file_lo ... 0", [1556799740,"fil ... "])
 4. /var/www/html/lib/private/Files/Storage/Common.php line 714
    acquireLock("files/e350fc486c3b1c20f0e2ce0cf7bb3368", 1)
 5. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 593
    acquireLock("files/cody", 1, OC\Lock\DBLockingProvider {})
 6. /var/www/html/lib/private/Files/View.php line 1924
    acquireLock("files/cody", 1, OC\Lock\DBLockingProvider {})
 7. /var/www/html/lib/private/Files/View.php line 2038
    lockPath("/cody", 1)
 8. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 154
    lockFile("/cody/files/Fro ... t", 2)
 9. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
    createFile("moonlight.jpg", null)
10. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
    createFile("files/cody/From ... g", null, null)
11. <<closure>>
    httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
12. /var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
13. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    emit("method:PUT", [Sabre\HTTP\Requ ... }])
14. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
15. /var/www/html/apps/dav/lib/Server.php line 301
    exec()
16. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    exec()
17. /var/www/html/remote.php line 163
    require_once("/var/www/html/a ... p")

PUT /remote.php/dav/files/cody/From%20Dropbox/Wallpaper/moonlight.jpg
from 10.42.5.0 by cody at 2019-05-02T11:22:20+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'INSTANCE_ID',
  'passwordsalt' => 'PASSWORD_SALT',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => 'MY_URL',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '15.0.7.0',
  'overwrite.cli.url' => 'MY_URL',
  'dbname' => 'DBNAME',
  'dbhost' => 'DBHOST',
  'dbport' => '',
  'dbtableprefix' => '',
  'mysql.utf8mb4' => true,
  'dbuser' => 'DBUSER',
  'dbpassword' => 'DBPASSWORD',
  'installed' => true,
);

The output of your Apache/nginx/system log in /var/log/____:

10.42.5.0 - - [02/May/2019:17:31:42 +0000] "GET /status.php HTTP/1.1" 200 1575 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/2.23.5"
[Thu May 02 17:31:44.999141 2019] [core:notice] [pid 1] AH00051: child pid 28 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Thu May 02 17:31:44.999809 2019] [core:notice] [pid 1] AH00051: child pid 29 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Thu May 02 17:31:44.999974 2019] [core:notice] [pid 1] AH00051: child pid 30 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Thu May 02 17:31:45.001442 2019] [core:notice] [pid 1] AH00051: child pid 31 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Thu May 02 17:31:45.001877 2019] [core:notice] [pid 1] AH00051: child pid 32 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Thu May 02 17:31:45.002082 2019] [core:notice] [pid 1] AH00051: child pid 33 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Thu May 02 17:31:45.003320 2019] [mpm_prefork:notice] [pid 1] AH00169: caught SIGTERM, shutting down