Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server repeatedly fill disk with infinite log messages: "hash_hmac(): Unknown hashing algorithm:sha1" #9243

Closed
smkent opened this issue Apr 19, 2018 · 26 comments

Comments

@smkent
Copy link

smkent commented Apr 19, 2018

I am not sure if this is a problem in the server or the Android app. My Nextcloud server intermittently generates these log messages within data/nextcloud.log . Once the server starts generating these messages, they're logged repeatedly as fast as the server can generate them until the partition containing the log file runs out of disk space:

{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
[repeat until disk is full]

This does not seem to occur as a result of taking any sort of action, and these log messages are not preceded by any other log messages.

Steps to reproduce

  1. Install Nextcloud server
  2. Install Android app, connect it to server, possibly enable+configure instant photo uploads (the only thing I use the app for)
  3. ???
  4. Nextcloud server sometimes starts generating repeating log messages like the above and doesn't stop until the partition containing data/nextcloud.log becomes full

Expected behaviour

The Nextcloud server should not generate repeated log messages that fill up the disk

Actual behaviour

The Nextcloud server frequently (every other day or so) frequently consumes my entire disk with the above log messages and I have to truncate the log file

Server configuration

Operating system: Gentoo Linux

Web server: Apache 2.4.29-r1

Database: MySQL 5.6.39

PHP version: PHP 7.1.15

Nextcloud version: 13.0.0

Updated from an older Nextcloud/ownCloud or fresh install: Upgraded from previous versions, I have installed each major release. This issue has been present since at least 12.0.0 and I believe in prior major releases too.

Where did you install Nextcloud from: Operating system repository

Signing status:

Signing status
Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- EXTRA_FILE
		- .webapp-nextcloud-13.0.0

Raw output
==========
Array
(
    [core] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [.webapp-nextcloud-13.0.0] => Array
                        (
                            [expected] => 
                            [current] => 
                        )

                )

        )

)

List of activated apps:

App list
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
Enabled:
  - activity: 2.6.1
  - bruteforcesettings: 1.0.3
  - comments: 1.3.0
  - dav: 1.4.6
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_pdfviewer: 1.2.0
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.0
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - theming: 1.4.1
  - twofactor_backupcodes: 1.2.3
  - updatenotification: 1.3.0
  - user_ldap: 1.3.1
  - workflowengine: 1.3.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_external

Nextcloud configuration:

Config report
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "<redacted_domain>"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbtype": "mysql",
        "version": "13.0.0.14",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "<redacted_table_prefix>",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "mail_smtpmode": "sendmail",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,
        "maintenance": false,
        "htaccess.RewriteBase": "\/",
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory"
    }
}

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: LDAP

LDAP configuration (delete this part if not used)

LDAP config
I would need to redact most, if not all, of my LDAP configuration. Please tell me if specific values are needed to diagnose.

Client configuration

Browser: Nextcloud Android app

Operating system: Android

Logs

Web server error log

Web server error log

Every 10 minutes, I have a chunk of these:

<IP_redacted> - <user_redacted> [18/Apr/2018:00:45:13 -0700] "GET /nextcloud/index.php/204 HTTP/1.1" 204 - "-" "Mozilla/5.0 (Android) ownCloud-android/3.1.0"
<IP_redacted> - <user_redacted> [18/Apr/2018:00:45:13 -0700] "GET /nextcloud/index.php/204 HTTP/1.1" 204 - "-" "Mozilla/5.0 (Android) ownCloud-android/3.1.0"
<IP_redacted> - <user_redacted> [18/Apr/2018:00:46:37 -0700] "GET /nextcloud/index.php/204 HTTP/1.1" 204 - "-" "Mozilla/5.0 (Android) ownCloud-android/3.1.0"
<IP_redacted> - <user_redacted> [18/Apr/2018:00:46:38 -0700] "GET /nextcloud/index.php/204 HTTP/1.1" 204 - "-" "Mozilla/5.0 (Android) ownCloud-android/3.1.0"

There is no other diagnostic information in the Apache access or error logs.

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
{"reqId":"Wtb33eq@fRrbDOPQpXZjvQAAAEQ","level":3,"time":"2018-04-18T07:59:38+00:00","remoteAddr":"<IP redacted>","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm:sha1 at \/var/www/localhost/htdocs\/nextcloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.1.0","version":"13.0.0.14"}
[repeat until disk is full]

Browser log

Browser log

N/A, unless I can somehow get logging details from the Android app

@smkent
Copy link
Author

smkent commented Apr 19, 2018

I should note the only seemingly-relevant information I found while searching around was this: https://help.nextcloud.com/t/unknown-hashing-algorithm-sha1/1031

However, I have enabled USE=mhash in my PHP installation and the issue still occurs.

@podkilla
Copy link

podkilla commented May 10, 2018

i have the exact same problem - disabling opcache is a workaround for me but not a solution as it comes with a performance hit.
using php 5.6 also does not result in this error.

@smkent
Copy link
Author

smkent commented May 11, 2018

After some digging, it appears that this issue may be a result of non-thread-safe PHP code entering into a bad state when executed under a multithreaded environment (such as with Apache 2.4's event MPM, which I am using). There is a generic mention of potential multithreading issues with various Apache MPMs here: https://wiki.apache.org/httpd/PHP-FPM

Based on this information, I installed PHP-FPM and configured Apache to use it instead of just mod_php by itself. It's been about a week since I migrated to PHP-FPM, and I've been making decent use of my Nextcloud app's auto upload. This issue has not occurred since I migrated.

For anyone finding this via Google, note that to make Nextcloud login work properly with PHP-FPM I also had to configure Apache to preserve the authorization information using mod_rewrite and the following configuration:

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@terrytibbles
Copy link

I've got the exact same problem. I have a Debian 7 system and upgrading from Apache 2.4.25 to 2.4.29 causes the MPM to change from worker to event. I've just tried re-compiling with the worker MPM (which worked previously), so we'll see what happens.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Jun 21, 2018
@smkent
Copy link
Author

smkent commented Jun 21, 2018

It's been a while since I migrated to PHP-FPM and the issue still has not returned.

@podkilla
Copy link

podkilla commented Jun 21, 2018

for me the problem went away after migrating from apache to nginx and php-fpm

@terrytibbles
Copy link

@jospoortvliet Is the worker MPM in Apache a known requirement? Is it worth adding it to the documentation?

@jospoortvliet
Copy link
Member

@terrytibbles I haven't verified this myself but it is worthwhile doing a quick pr to the docs to let someone there look at it 😸

@meskal
Copy link

meskal commented Jul 31, 2018

I am having the same problem also on gentoo. Unfortunately migrating apache mpm from event to worker did not mitigate the issue.

@meskal
Copy link

meskal commented Aug 10, 2018

Since phpseclib's docs suggest that bcmath and gmp might also be useful I tried various combinations of these useflags for php without success and also ended up migrating to php-fpm.

@jospoortvliet
Copy link
Member

Did php-fpm fix it?

@meskal
Copy link

meskal commented Aug 11, 2018

Unfortunately I am not able to deterministically reproduce the issue. Therefore I have to wait to verify its absence.
Up until now (~24h) php-fpm seems to mitigate the issue however it also happend that it did not come up for several days before.

I'll keep you informed.

@Tamsy
Copy link

Tamsy commented Aug 20, 2018

This very same problem started for us with PHP 7.2.8, mod_php and Apache 2.4.34 compiled with event MPM (which we are using since early Apache 2.4 without any problems).

Reverting back to PHP 7.2.7 mitigates the issue.

Now PHP 7.2.9 was released. First I compiled it with mod_php but after a short while those "hash_hmac(): Unknown hashing algorithm: sha1 ..." messages flooded the nextcloud.log again (sometimes the error messages also read "hash(): Unknown hashing algorithm: sha512").

As suggested in this thread I switched from mod_php to PHP-FPM.

Unfortunately this does not bring any remedy to the problem but this morning the "Unknown hashing algorithm" messages had started again.

I will revert back to PHP 7.2.7 since with 7.2.7 the server runs just smooth without any problems.

Worth mentioning that whenever this happens after a while all connections to MySQL are starting to fail. MySQL eventually starts to block all connections regardless of the sources (also non-php connections). A restart of Apache brings remedy for a while.

Server configuration:
Operating system: Ubuntu 18.04.1 LTS
Web server: Apache 2.4.34 using HTTP/2
Database: MySQL 5.7.23
Redis 4.0.11 with PHP-module redis-4.1.1
APCU 5.1.12
PHP OPcache ON
PHP version: PHP 7.2.8 and PHP 7.2.9
Nextcloud version: 13.0.5.2

@terrytibbles
Copy link

I think this is a problem with memory. Despite having a reasonable amount of physical memory available and little swap, setting Nextcloud to use APCu seems to cause these problems. This is especially bad under high load, when the server can crash (go to 100% CPU) at regular intervals.

I've currently mitigated this problem by setting Nextcloud not to use APCu and using the worker MPM, which is a lot more stable on my system. I'm currently monitoring the performance, but it's been pretty stable so far.

@ion-lane
Copy link

ion-lane commented Feb 2, 2019

I also had endless messages "hash (): Unknown hashing algorithm: sha512" in the log and the CPU load is 100% until you restart the Apache.
I was enable php opcache according to the instructions. For a week there was no problem.

@kesselb
Copy link
Contributor

kesselb commented Feb 2, 2019

#12722 looks similar.

@af7567
Copy link

af7567 commented Mar 6, 2019

Has this problem been fixed in nextcloud 14?

I had always had this problem when trying to upgrade from php5 to php7 so I gave up with php7 until it was really necessary.
I upgraded to php 7.2.15 yesterday and now after 24 hours apache is at 100% CPU and nextcloud.log is filling up with

{"reqId":"es7zXOVWCYYAXXkB39gK","level":3,"time":"2019-03-06T12:39:49+00:00","remoteAddr":"128.128.141.154","user":"--","app":"PHP","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/","message":"hash_hmac(): Unknown hashing algorithm: sha1 at \/var\/www\/htdocs\/owncloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0","version":"13.0.12.1"}
{"reqId":"CrwdZmCcew4msqf00D62","level":3,"time":"2019-03-06T12:39:49+00:00","remoteAddr":"128.128.141.154","user":"--","app":"PHP","method":"GET","url":"\/owncloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm: sha1 at \/var\/www\/htdocs\/owncloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0","version":"13.0.12.1"}
{"reqId":"CrwdZmCcew4msqf00D62","level":3,"time":"2019-03-06T12:39:49+00:00","remoteAddr":"128.128.141.154","user":"--","app":"PHP","method":"GET","url":"\/owncloud\/index.php\/204","message":"hash_hmac(): Unknown hashing algorithm: sha1 at \/var\/www\/htdocs\/owncloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0","version":"13.0.12.1"}
{"reqId":"es7zXOVWCYYAXXkB39gK","level":3,"time":"2019-03-06T12:39:49+00:00","remoteAddr":"128.128.141.154","user":"--","app":"PHP","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/","message":"hash_hmac(): Unknown hashing algorithm: sha1 at \/var\/www\/htdocs\/owncloud\/3rdparty\/phpseclib\/phpseclib\/phpseclib\/Crypt\/Hash.php#308","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0","version":"13.0.12.1"}

I can't login to nextcloud from any client without restarting apache. The android device is using the latest version of the nextcloud app.

I am currently using nextcloud 13.0.12 but want to update to 14.0.8 when I know php7 is working properly.

@Tamsy
Copy link

Tamsy commented Mar 6, 2019

We only got rid of the problem by compiling Apache with mpm=worker (instead of mpm=event) and by enabling PHP-FPM. Since then those problems are gone.

@af7567
Copy link

af7567 commented Mar 6, 2019

We only got rid of the problem by compiling Apache with mpm=worker (instead of mpm=event) and by enabling PHP-FPM. Since then those problems are gone.

Ok, thanks.
I saw about using php-fpm instead, and also in #12722 that upgrading to nextcloud 15 may have fixed it. So I will give it a try with nextcloud 15 and see how it goes, then change to php-fpm if I need to.

@terrytibbles
Copy link

Seems that PHP 7.3 may be a solution, too.

@af7567
Copy link

af7567 commented Mar 7, 2019

Yes, I will try with php 7.3 now and save changing over to php-fpm as the last resort.
After about 6 hours with php 7.2 and nextcloud 15 I started getting errors again and general nextcloud reliability problems. So I tried turning off php opcache as I saw someone mentioned that earlier, and also the apcu memcache but again sometime overnight the errors came back and everything was generally unstable.

@af7567
Copy link

af7567 commented Mar 12, 2019

After updating to PHP 7.3 from 7.2 everything has been working well for 4 days now, rather than starting to die after 6 hours. This is with the PHP opcache and the APCu local memcache enabled.

I am still using mod_php with apache mpm_event_module just like I was with PHP 5.6 and NC 13, so in the end all I needed to do was upgrade straight from PHP 5.6 to PHP 7.3. For some reason 7.0, 7.1, and 7.2 don't like my system.

The server it is running on is a pretty old one now though with just 4GB of RAM and 32-bit slackware 14.2.

edit: I did also disable a couple of php extensions which I didn't need, and installed the php-imagick extension since it was recommended. All the opcache settings are those recommended on the nextcloud settings overview page.
I also set MaxConnectionsPerChild to 5000 in the apache mpm_event_module settings, I'm not sure if this is making any difference though. From what I read it might help in case of any problems caused by memory leaks but it didn't help with PHP 7.2.

@kesselb
Copy link
Contributor

kesselb commented Mar 12, 2019

Here are more reports that php-fpm fixed this issue somehow:

If your php setup stops working there is not much we can do. You may report this kind of problem to mod_php or switch to php-fpm (there are a lof ot advantages anyway).

Closing this issue because there are reports for other php applications and the issue (it's related to some special kind of configuration) can not be fixed by nextcloud.

@kesselb kesselb closed this as completed Mar 12, 2019
@yourcloudasia
Copy link

Can I ask if anyone experiencing this problem is running Nextcloud on a low memory system, like 2 GB RAM or less? What's the swap usage when this occurs?

@coh7eiqu8thaBu
Copy link

I use now PHP-FPM, I'll wait for re-seeing the loop.

@coh7eiqu8thaBu
Copy link

Seem resolve the problem 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests