Random 500 internal server error when uploading files

After upgrading to Seafile 6.2.5 I experience random 500 internal server errors when uploading files using Seafile Web API web_api.html#upload-file method. The 500 response is sometimes returned when I’m getting upload link or when uploading the file. I have performed multiple tests and it seams to be not deterministic. It happens that all files are uploaded without an error. In the next try for some files 500 are returned. The files are uploaded sequentially, there is no concurrent upload. For each file a new upload link is obtained.

There is no errors or exceptions in the Seafile logs even though log level is set to DEBUG.

Are the 500 responses expected behaviour of the Seafile Server?
Is there any other way to debug Seafile server in order to get some more information about the reason of the 500 response? Maybe debug log level should be placed in a different configuration file?

I’m using Seafile 6.2.5 community version installed on Centos 7 with Apache proxy configured as described here https://manual.seafile.com/deploy/deploy_with_apache.html. For logging I’m using configuration described here https://manual.seafile.com/deploy/using_syslog.html with all log levels set to DEBUG.

Thank you in advance for any suggestions

1 Like

Do you use reverse proxy or fastcgi?

Yes. It is configured like this:

# seafile fileserver
ProxyPass /seafhttp
ProxyPassReverse /seafhttp
RewriteRule ^/seafhttp - [QSA,L]

# seahub
SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
ProxyPass / fcgi://
ProxyPassReverse / fcgi://

You might try taking a look at the system log to see if it is reporting any problems elsewhere that may be affecting this. The fact that it’s random and has no predictable pattern tells me that something else outside Seafile may be the issue.

Also, as a side note, fastcgi is going away after 6.2.5. 6.3 will not include it. So, you may want to go ahead and reconfigure your server to use wsgi instead. Instructions are in the changelog of the Seafile manual.