The Basics
- Nextcloud Server version (e.g., 29.0.5): 30.02
replace me
- Operating system and version (e.g., Ubuntu 24.04): Ubuntu 22.04
replace me
- Web server and version (e.g, Apache 2.4.25): 2.4.52
replace me
- Reverse proxy and version _(e.g. nginx 1.27.2) 1.22
replace me
- PHP version (e.g, 8.3): 8.2.25
replace me
- Is this the first time you’ve seen this error? (Yes / No): No
replace me
- When did this problem seem to first start? Slowly over the years
replace me
- Installation method (e.g. AIO, NCP, Bare Metal/Archive, etc.) Bare meta;
replace me
- Are you using Cloudflare, mod_security, or similar? (Yes / No) No
replace me
Summary of the issue you are facing:
No errors to report, my issue may be server performance related. We have a LOT of photos in the photo app, and I notice rendering thumbnails puts a heavy strain on the server. I am running opcache, apcu and redis, config below. The server it’s running on is an older 8 core Xeon, with 32GB of RAM. Runs great 99% of the time, just gets overloaded during lots of scrolling.
My question is, if I throw more hardware at nextcloud, will this improve photo rendering performance? Doing a deep scroll on the photos app pegs all 8 cores, so I am assuming we either need to scale back the photos (currently 150G worth) or run it on a bigger server with more power.
Paste of my config:
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"cloud.example.com"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "30.0.2.2",
"overwrite.cli.url": "http:\/\/192.168.50.25",
"overwriteprotocol": "https",
"memcache.local": "\\OC\\Memcache\\APCu",
"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": "",
"default_language": "en",
"default_locale": "en_US",
"default_phone_region": "US",
"loglevel": 0,
"onlyoffice": {
"verify_peer_off": true,
"jwt_secret": "***REMOVED SENSITIVE VALUE***",
"jwt_header": "AuthorizationJwt"
},
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpsecure": "tls",
"mail_smtpauthtype": "LOGIN",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"filelocking.enabled": "true",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": "0",
"dbindex": "0",
"timeout": "1.5"
},
"htaccess.RewriteBase": "\/",
"overwritehost": "cloud.example.com",
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
"maintenance_window_start": 1,
"integrity.check.disabled": false,
"0": {
"=": {
"true": ""
}
},
"dbuser=nextcloud": ""
}
}
Note, I did see some errors in the apache error log: “server is within MinSpareThreads of MaxRequestWorkers,
consider raising the MaxRequestWorkers setting”
So I raised them in mpm_event.conf:
/etc/apache2/mods-enabled/mpm_event.conf
<IfModule mpm_event_module>
StartServers 25
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestWorkers 500
MaxConnectionsPerChild 0
</IfModule>
This helped, but it still puts a strain on apache it seems. Still combing the logs for clues. I tend to think the server is just not enough for such a large number of photos.
Thank you