I’ve got very slow load of SuiteCRM as web site, i.e. server response time is very high.
When start web-site crm.example.com it take more than 30 sec to load web-view (login page). And each requests/links inside CRM take > 30 sec to load.
Here is a test with curl:
curl -s -w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nAppCon time:\t%{time_appconnect}\nRedirect time:\t%{time_redirect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null https://crm.example.com
Result:
Lookup time: 0.106318
Connect time: 0.307331
AppCon time: 0.327264
Redirect time: 0.000000
PreXfer time: 0.327471
StartXfer time: 32.357595
Total time: 32.357736
Sysinfo
OS: Arch Linux x64, VPS, RAM 8G, SSD, CPU 4 cores
SuiteCRM 7.11.9
Nginx 1.16.1
PHP 7.3.11
PHP-FPM 3.3.11
Zend OPcache 7.3.11
MariaDB 10.4.8
Configs
- nginx
[code]
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /srv/http/suitecrm;
index index.php index.html index.htm;
server_name crm.example.com;
access_log /var/log/nginx/crm.success.log;
error_log /var/log/nginx/crm.error.log;
client_max_body_size 100M;
ssl_certificate /etc/letsencrypt/live/crm.example.co/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/crm.example.com/privkey.pem; # managed by Certbot
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 9.9.9.9 1.1.1.1 valid=300s;
resolver_timeout 5s;
# Disable preloading HSTS for now. You can use the commented out header line that includes
# the "preload" directive if you understand the implications.
#add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
proxy_buffering off;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Block access to stuff in the root
location ~* \.(pl|cgi|py|sh|lua|log|md5)$ {
return 444;
}
# Block access to data folders
location ~ /(soap|cache|upload|xtemplate|data|examples|include|log4php|metadata|modules|diagnostic|blowfish|emailmandelivery)/.*\.(php|pl|py|jsp|asp|sh|cgi|tpl|log|md5)$ {
return 444;
}
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
#include snippets/fastcgi-crm-php.conf;
#if (!-f $document_root$fastcgi_script_name) {
# return 404;
#}
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
# Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
# Enable pretty urls
fastcgi_param front_controller_active true;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_pass unix:/var/run/php-fpm/php-fpm-crm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
#location ~ /\.ht {
# deny all;
#}
}
server {
if ($host = crm.example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80 ;
listen [::]:80 ;
server_name crm.example.com;
return 404; # managed by Certbot
}
[/code]- php-fpm
[code]
#/etc/php/php-fpm.d/crm.conf
[crm]
user = http
group = http
listen = /run/php-fpm/php-fpm-crm.sock
listen.owner = http
listen.group = http
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
[/code]- PHP
Required extensions are set up.
APCu & APC are enabled.
Other options are pretty default.- MariaDB
Default setup.
[/ul]
Logs:
I don’t see any specific error logs.
There is another PHP based service/website on the server and it works great. Different unix sockets are used for php-fpm backend.
I’ve installed suitecrm on Virtual Ubuntu with similar configs and it worked ok.
Also reinstalle the crm service, wiped data, files, databases. But with no luck.
And now I have no clue what to do and what the porblem is.
Any ideas?