Insanely slow page loads :(

Hi

I was trying to increase the page response times by follwoing

https://docs.nextcloud.com/server/13/admin_manual/configuration_server/server_tuning.html?highlight=performance

My pages were like 3-5 secs before but now they are over 10-20 secs :frowning: I do not understand this. I must have done something that I cant trace back anymore.

 apache2 -v
Server version: Apache/2.4.33 (Debian)

Server version: 10.1.29-MariaDB-6+b1 Debian buildd-unstable

cat /etc/debian_version
buster/sid

php -v
PHP 7.2.4-1+b2 (cli) (built: May 29 2018 02:53:13) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.2.4-1+b2, Copyright © 1999-2018, by Zend Technologies

For the full php -i
https://paste.debian.net/hidden/27353648/

/e/a/mods-enabled # ❯❯❯ ls
access_compat.load  authz_core.load  cache_socache.load  dnssd.conf    include.load      negotiation.load     proxy.conf          proxy.load           setenvif.load       status.load
alias.conf          authz_host.load  cgi.load            dnssd.load    mime.conf         php7.1.conf          proxy_connect.load  proxy_wstunnel.load  slotmem_shm.load    wsgi.conf
alias.load          authz_user.load  deflate.conf        env.load      mime.load         php7.1.load          proxy_fcgi.load     reqtimeout.conf      socache_shmcb.load  wsgi.load
auth_basic.load     autoindex.conf   deflate.load        expires.load  mpm_prefork.conf  proxy_ajp.load       proxy_ftp.conf      reqtimeout.load      ssl.conf            xml2enc.load
authn_core.load     autoindex.load   dir.conf            filter.load   mpm_prefork.load  proxy_balancer.conf  proxy_ftp.load      rewrite.load         ssl.load            xsendfile.load
authn_file.load     cache.load       dir.load            headers.load  negotiation.conf  proxy_balancer.load  proxy_http.load     setenvif.conf        status.conf

lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Model name: Intel® Core™ i7-3610QM CPU @ 2.30GHz
Stepping: 9
CPU MHz: 1197.277
CPU max MHz: 3300.0000
CPU min MHz: 1200.0000
BogoMIPS: 4589.50
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0-7

Mem[||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||6.12G/7.72G]
Swp[|||||||||||||||||||||| 2.24G/7.81G

'dbtype' => 'mysql',
'dbname' => 'nextcloud2',
'dbhost' => 'localhost:3306',
'dbtableprefix' => 'oc_',
'version' => '13.0.4.0',
'installed' => true,
'maxZipInputSize' => 0,
'allowZipDownload' => true,
'theme' => '', 
'maintenance' => false,
'forcessl' => true,
'memcache.local' => '\OC\Memcache\APCu',
'loglevel' => 0,
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',


 <VirtualHost _default_:443>
        #Protocols h2 http/1.1

    ServerAdmin webmaster@localhost

    RequestHeader set X-Forwarded-Proto "https"

    BrowserMatch "MSIE [2-6]" \
        nokeepalive ssl-unclean-shutdown \
        downgrade-1.0 force-response-1.0
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

        DocumentRoot /var/www/html
        <Directory />
        Options Includes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

#Include conf-available/serve-cgi-bin.conf

        SSLEngine on

        SSLCertificateFile      cert.pem 
        SSLCertificateKeyFile  privkey.pem

        SSLCertificateChainFile chain.pem


        <FilesMatch "\.(cgi|shtml|phtml|php)$">
        SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
        SSLOptions +StdEnvVars
        </Directory>
        </VirtualHost>

Try to reduce the amount of swap your server is using. The easiest way to do this may be to add more memory. Do you get the same problem when there is no swap being used (after a reboot, for example)?

I restarted myserver it helped a bit, then I did mysql database repair, and things git much better for me as far as I can tell. I am going to look into the swap issue you mentioned, I will monitor it.