500 Internal Server Error and Long Term Reliability

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home users. If you’re running a business, get help on portal.nextcloud.com so we can make sure 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

Remember, the below information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Please delete everything above when creating your topic and provide the following:

Nextcloud version (eg, 12.0.2): 13.0.0
Operating system and version (eg, Ubuntu 17.04): Ubuntu 16.04.3 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.18 (Ubuntu)
PHP version (eg, 7.1): PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )

The issue you are facing: After upgrading via web GUI from 12.0.5 to 13.0.0, I’m getting a 500 Internal Server Error. I suspect this is related to my Let’sEncrypt certificate because that’s what it was when I upgraded from 12.0.4 (the original install version), but I don’t actually know. After searching the forums and trying things for a couple days now, I haven’t found anything that has resolved the problem, or improved it in any way.

I am new to NextCloud, and so far I’m really impressed with the usability, features, and extensibility, but I’ve been disappointed by all of the issues that are challenging for me to diagnose. I want to use this as my primary data repository, but I still haven’t successfully finished diagnosing all of it’s issues. The 13 upgrade is supposed to resolve a few, but obviously, it hasn’t. Am I naive to think an upgrade shouldn’t radically break things like this? NextCloud seems to be a really slick app, it makes me think I seriously don’t know what I’m doing. I don’t, but I thought I knew more than this.

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

Steps to replicate it:

  1. Upgrade from 12.0.5 to 13.0.0 via web GUI.
  2. Refresh site.

The output of your Nextcloud log in Admin > Logging:

I can't access the GUI, and the log file I was able to find (/var/www/nextcloud/data/nextcloud.log) is 62,922 rows long, far too much to paste here.

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

<?php
$CONFIG = array (
  'instanceid' => '[redacted]',
  'passwordsalt' => '[redacted]',
  'secret' => '[redacted]',
  'trusted_domains' =>
  array (
    0 => '[redacted IPv4]',
    1 => '[redacted example.domain.com]',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => 'https://[redacted]/nextcloud',
  'dbtype' => 'mysql',
  'version' => '13.0.0.14',
  'dbname' => '[redacted]',
  'dbhost' => 'localhost:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '[redacted]',
  'dbpassword' => '[redacted]',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'loglevel' => 0,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'logtimezone' => 'America/Chicago',
  'logdateformat' => 'M d o, G:i:s',
  'htaccess.RewriteBase' => '/',
  'mail_from_address' => '[redacted]',
  'mail_domain' => '[redacted]',
  'maintenance' => false,
  'theme' => '',
  'mail_smtphost' => '[redacted]',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpsecure' => 'tls',
  'mail_smtpname' => '[redacted]',
  'mail_smtppassword' => '[redacted]',
  'updater.release.channel' => 'stable',
  'updater.secret' => '[redacted]',
);

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

PASTE HERE

Can you access your server error logs?

If you tell me where to find it. If it’s the /var/log/syslog, then yes, I found it, but it exposes my IP and I was hoping not to have to do that. Advice welcome, even if I’m being overly protective.

You want your web server logs – where exactly they are depends on how you set up Apache, but this stack exchange post has some good starting points.

You’re specifically looking for the error logs.

If you use tail -n 20 /path/to/error/log you should be able to grab a small chunk of your error logs and see some clues to why you’re getting a 500 error.

Thank you! From the error message, I was able to identify that there was a missing bracket in my .htaccess file. Since it was the very last bracket, I assume it was my fault from when I reentered the HSTS code. This issue is now resolved, and thank you @amandabee!

If you or anyone else has thoughts about overall reliability, I’m all ears. Now that it’s working, I can begin testing the other things that should be fixed in 13 (like deleting files in an S3 bucket).