Sudden Internal Server Error message

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 29.0.8
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 12.8
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.62
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • replace me
  • PHP version (e.g, 8.3):
    • php 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • 26nov am
  • Installation method (e.g. AIO, NCP, Bare Metal/Archive, etc.)
    • bare
  • Are you using Cloudflare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Suddenly, this morning, I started receiving errors with caldav on my mobile phone (I have calendars and contacts sync set up).
Having tried to connect to the web page, it’s not working, I get a

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I have no idea why as I haven’t changed anything recently.

Steps to replicate it (hint: details matter!):

Try to access my instance.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

Not possible as no web access

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

Not possible

Web server / Reverse Proxy

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

x.x.x.x - - [26/Nov/2024:00:00:54 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:00:15:55 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:00:31:48 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:00:34:48 +0000] "PROPFIND /remote.php/dav/calendars/user123/contact_birthdays/ HTTP/2.0" 207 1484 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:00:34:49 +0000] "PROPFIND /remote.php/dav/calendars/user123/personal/ HTTP/2.0" 207 537 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:00:47:17 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:01:02:19 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:01:18:47 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:01:34:00 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:01:49:03 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:01:56:30 +0000] "PROPFIND /remote.php/dav/addressbooks/users/user123/contacts/ HTTP/2.0" 207 1406 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:02:04:09 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:02:19:12 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:02:34:21 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:02:43:02 +0000] "GET /wp-login.php HTTP/1.1" 404 6732 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0"
x.x.x.x - - [26/Nov/2024:02:49:21 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:03:04:23 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:03:19:24 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:03:22:23 +0000] "GET / HTTP/1.1" 302 5004 "-" "-"
x.x.x.x - - [26/Nov/2024:03:22:23 +0000] "GET /index.php/login HTTP/1.1" 200 22004 "-" "-"
x.x.x.x - - [26/Nov/2024:03:22:25 +0000] "GET / HTTP/1.1" 302 1413 "-" "-"
x.x.x.x - - [26/Nov/2024:03:22:25 +0000] "GET /index.php/login HTTP/1.1" 200 22006 "-" "-"
x.x.x.x - - [26/Nov/2024:03:22:26 +0000] "GET / HTTP/1.1" 302 1403 "-" "-"
x.x.x.x - - [26/Nov/2024:03:22:26 +0000] "GET /index.php/login HTTP/1.1" 200 22014 "-" "-"
x.x.x.x - - [26/Nov/2024:03:34:25 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:03:43:30 +0000] "PROPFIND /remote.php/dav/addressbooks/users/user123/contacts/ HTTP/2.0" 207 1412 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:03:49:36 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:04:04:40 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:04:19:59 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:04:34:52 +0000] "PROPFIND /remote.php/dav/calendars/user123/contact_birthdays/ HTTP/2.0" 207 1481 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:04:34:52 +0000] "PROPFIND /remote.php/dav/calendars/user123/personal/ HTTP/2.0" 207 514 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:04:35:01 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:04:50:01 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:05:06:31 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:05:07:47 +0000] "PROPFIND /remote.php/dav/addressbooks/users/user123/contacts/ HTTP/2.0" 207 1401 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:05:20:53 +0000] "PROPFIND /remote.php/dav/addressbooks/users/user124/contacts/ HTTP/2.0" 207 1410 "-" "DAVx5/4.3.15-ose (2024/03/24; dav4jvm; okhttp/4.12.0) Android/14"
x.x.x.x - - [26/Nov/2024:05:20:54 +0000] "PROPFIND /remote.php/dav/calendars/user124/personal-1/ HTTP/2.0" 207 1473 "-" "DAVx5/4.3.15-ose (2024/03/24; dav4jvm; okhttp/4.12.0) Android/14"
x.x.x.x - - [26/Nov/2024:05:21:34 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:05:38:31 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:05:53:33 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5578 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:06:08:34 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:06:23:35 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:06:39:37 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 500 5117 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
x.x.x.x - - [26/Nov/2024:06:48:47 +0000] "PROPFIND /remote.php/dav/addressbooks/users/user123/contacts/ HTTP/2.0" 500 542 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:07:12:07 +0000] "GET /test/wp-login.php HTTP/1.1" 500 778 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0"
x.x.x.x - - [26/Nov/2024:07:50:47 +0000] "PROPFIND /remote.php/dav/addressbooks/users/user123/contacts/ HTTP/2.0" 500 541 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:08:01:07 +0000] "PROPFIND /remote.php/dav/addressbooks/users/user123/contacts/ HTTP/2.0" 500 541 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:08:37:06 +0000] "PROPFIND /remote.php/dav/calendars/user123/contact_birthdays/ HTTP/2.0" 500 541 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"
x.x.x.x - - [26/Nov/2024:08:37:06 +0000] "PROPFIND /remote.php/dav/calendars/user123/personal/ HTTP/2.0" 500 318 "-" "DAVx5/4.3.13-ose (2024/02/15; dav4jvm; okhttp/4.12.0) Android/12"

What’s interesting here is that it all seems to work till around 06:23:
x.x.x.x - - [26/Nov/2024:06:23:35 +0000] "PROPFIND /remote.php/dav/files/user123/ HTTP/1.1" 207 5485 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2" as there’s still a 207 on the response.
The following entry at 26/Nov/2024:06:39:37 is where the 500 responses start.

Configuration

Nextcloud

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.xavserver.co.uk"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.8.1",
        "overwrite.cli.url": "http:\/\/nextcloud.xavserver.co.uk",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [
            "admin"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 1,
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "default_locale": "en_GB",
        "default_phone_region": "GB",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        }
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 2.21.1
  - bruteforcesettings: 2.9.0
  - calendar: 4.7.16
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.1
  - files_accesscontrol: 1.19.1
  - files_downloadlimit: 2.0.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - nextcloud_announcements: 1.18.0
  - notifications: 2.17.0
  - oauth2: 1.17.1
  - password_policy: 1.19.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - richdocuments: 8.4.7
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - support: 1.12.0
  - survey_client: 1.17.0
  - systemtags: 1.19.0
  - tasks: 0.16.1
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - admin_audit: 1.19.0
  - encryption: 2.17.0
  - files_external: 1.21.0
  - fileslibreofficeedit: 2.0.1 (installed 2.0.1)
  - officeonline: 2.2.1 (installed 2.2.1)
  - photos: 2.5.0 (installed 1.0.0)
  - richdocumentscode: 24.4.802 (installed 24.4.802)
  - suspicious_login: 7.0.0
  - user_ldap: 1.20.0

I have checked things like redis-server, it’s up and running. Not sure where to look next. I’ve also rebooted the server just in case, but it hasn’t come up. All other Apache-related sites are up and the general server seems OK.

See Troubleshooting: Internal Server Errors.

Thanks.
I just found the error was to do with PHP. I reverted to 8.2 and it’s working again.