mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.89k stars 1.17k forks source link

Very slow WebUi with new Update #2450

Closed tobias992 closed 5 years ago

tobias992 commented 5 years ago

Hello, with new Update i have a very slow WebUi. Sometimes i have to wait over 10 seconds for site load. I cannot find any log confusions.

I only can see that i have massive "info" and "notice" entries in logs. Sometimes they are very confused to understand for me. A simple login/logout with sogo creates approximately 70 log entries.

andryyy commented 5 years ago

What is new? When was the last update?

Can you post your mailcow.conf? Just remove the hostname.

And don’t remove the issue template, please. You were asked for some information we are now missing. Reverse proxy for example.

tobias992 commented 5 years ago

The Update was 2 hours ago with new changes from today.

mailcow.conf (at beginning i only changed the DBNAME and DBUSER) `# ------------------------------

mailcow web ui configuration

------------------------------

example.org is not a valid hostname, use a fqdn here.

Default admin user is "admin"

Default password is "moohoo"

MAILCOW_HOSTNAME=email.xxxxxxxxxx.de

------------------------------

SQL database configuration

------------------------------

DBNAME=db_mailcow DBUSER=dbu_mailcow

Please use long, random alphanumeric strings (A-Za-z0-9)

DBPASS=xxxxxxxxxx DBROOT=xxxxxxxxxx

------------------------------

HTTP/S Bindings

------------------------------

You should use HTTPS, but in case of SSL offloaded reverse proxies:

HTTP_PORT=80 HTTP_BIND=0.0.0.0

HTTPS_PORT=443 HTTPS_BIND=0.0.0.0

------------------------------

Other bindings

------------------------------

You should leave that alone

Format: 11.22.33.44:25 or 0.0.0.0:465 etc.

Do not use IP:PORT in HTTP(S)_BIND or HTTP(S)_PORT

SMTP_PORT=25 SMTPS_PORT=465 SUBMISSION_PORT=587 IMAP_PORT=143 IMAPS_PORT=993 POP_PORT=110 POPS_PORT=995 SIEVE_PORT=4190 DOVEADM_PORT=127.0.0.1:19991 SQL_PORT=127.0.0.1:13306

Your timezone

TZ=Europe/Berlin

Fixed project name

COMPOSE_PROJECT_NAME=mailcowdockerized

Garbage collector cleanup

Deleted domains and mailboxes are moved to /var/vmail/_garbage/timestamp_sanitizedstring

How long should objects remain in the garbage until they are being deleted? (value in minutes)

Check interval is hourly

MAILDIR_GC_TIME=1440

Additional SAN for the certificate

#

You can use wildcard records to create specific names for every domain you add to mailcow.

Example: Add domains "example.com" and "example.net" to mailcow, change ADDITIONAL_SAN to a value like:

ADDITIONAL_SAN=imap.,smtp.

This will expand the certificate to "imap.example.com", "smtp.example.com", "imap.example.net", "imap.example.net"

plus every domain you add in the future.

#

You can also just add static names...

ADDITIONAL_SAN=srv1.example.net

...or combine wildcard and static names:

ADDITIONAL_SAN=imap.*,srv1.example.com

#

ADDITIONAL_SAN=

Skip running ACME (acme-mailcow, Let's Encrypt certs) - y/n

SKIP_LETS_ENCRYPT=n

Skip IPv4 check in ACME container - y/n

SKIP_IP_CHECK=n

Skip ClamAV (clamd-mailcow) anti-virus (Rspamd will auto-detect a missing ClamAV container) - y/n

SKIP_CLAMD=n

Enable watchdog (watchdog-mailcow) to restart unhealthy containers (experimental)

USE_WATCHDOG=n

Send notifications by mail (no DKIM signature, sent from watchdog@MAILCOW_HOSTNAME)

Can by multiple rcpts, NO quotation marks

WATCHDOG_NOTIFY_EMAIL=a@example.com,b@example.com,c@example.com

WATCHDOG_NOTIFY_EMAIL=

Max log lines per service to keep in Redis logs

LOG_LINES=9999

Internal IPv4 /24 subnet, format n.n.n (expands to n.n.n.0/24)

IPV4_NETWORK=172.22.1

Internal IPv6 subnet in fc00::/7

IPV6_NETWORK=fd4d:6169:6c63:6f77::/64

Use this IPv4 for outgoing connections (SNAT)

SNAT_TO_SOURCE=

Use this IPv6 for outgoing connections (SNAT)

SNAT6_TO_SOURCE=

Create or override API key for web uI

You must define API_ALLOW_FROM, which is a comma separated list of IPs

API_KEY allowed chars: a-z, A-Z, 0-9, -

API_KEY=

API_ALLOW_FROM=127.0.0.1,1.2.3.4

Set this to "allow" to enable the anyone pseudo user. Disabled by default.

When enabled, ACL can be created, that apply to "All authenticated users"

This should probably only be activated on mail hosts, that are used exclusivly by one organisation.

Otherwise a user might share data with too many other users.

ACL_ANYONE=disallow

Solr heap size, there is no recommendation, please see Solr docs.

Solr is a prone to run OOM on large systems and should be monitored. Unmonitored Solr setups are not recommended.

Solr will refuse to start with total system memory below or equal to 2 GB.

SOLR_HEAP=1024 SKIP_SOLR=n

MAILDIR_SUB defines a path in a users virtual home to keep the maildir in. Leave empty for updated setups.

MAILDIR_SUB=Maildir

MAILDIR_SUB=`

tobias992 commented 5 years ago

Sorry for the bad view. How i can optimize that in future posts?

K2rool commented 5 years ago

I've noticed the same issue on my Mailcow server updated a day ago, Sogo is fine it only happens if you login into WebUi as admin it hanging for about 10 secs for me, If you login into WebUi as email user it fine no slow loading. On Monday, March 18, 2019 23:54 GMT, tobias992 notifications@github.com wrote:   Sorry for the bad view. How i can optimize that in future posts? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

 

andryyy commented 5 years ago

When did you update before you updated yesterday?

ntimo commented 5 years ago

I am having the same problem on my two Cows, one gets updated daily in the morning. And both take about 15 seconds after entering the F2A code to show that it was accepted and to load properly.

ntimo commented 5 years ago

Also navigating in the interface is super slow and pages load around 15 seconds or longer.

ntimo commented 5 years ago

This is the php-fpm log:

php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Uptime: 2  Threads: 8  Questions: 1  Slow queries: 0  Opens: 17  Flush tables: 1  Open tables: 11  Queries per second avg: 0.500
php-fpm-mailcow_1    | MySQL @ 94769f85e0232373896864b6f37570adfe872292b3879feab8e8dxxxxxxxxxxx
php-fpm-mailcow_1    | MySQL applied an upgrade, restarting PHP-FPM...
php-fpm-mailcow_1    | Uptime: 1  Threads: 8  Questions: 1  Slow queries: 0  Opens: 17  Flush tables: 1  Open tables: 11  Queries per second avg: 1.000
php-fpm-mailcow_1    | MySQL @ 94769f85e0232373896864b6f37570adfe872292b3879feab8e8dxxxxxxxxxxx
php-fpm-mailcow_1    | MySQL is up-to-date
php-fpm-mailcow_1    | Running DB init...
php-fpm-mailcow_1    | Fixed _sogo_static_view
php-fpm-mailcow_1    | Cleaned up memcached
php-fpm-mailcow_1    | 1
php-fpm-mailcow_1    | 1
php-fpm-mailcow_1    | 1
php-fpm-mailcow_1    | 1
php-fpm-mailcow_1    | 1
php-fpm-mailcow_1    | 1
php-fpm-mailcow_1    | [19-Mar-2019 07:23:26] NOTICE: fpm is running, pid 1
php-fpm-mailcow_1    | [19-Mar-2019 07:23:26] NOTICE: ready to handle connections
andryyy commented 5 years ago

Since when exactly is it slow? Today? Yesterday?

andryyy commented 5 years ago

Nevermind. Found an installation where it happens.

andryyy commented 5 years ago

It is related to QR image generation, will check and fix.

tobias992 commented 5 years ago

My installations are slow since last update yesterday evening (after [Update] Fix MAILDIR_SUB comment).

andryyy commented 5 years ago

It is not related to updates. None of the last updates would cause that. It is QR image generation in the footer modal.

ntimo commented 5 years ago

A QR model generator? Is there even one QR code shown somewhere in the UI, because as far as I know. There are none.

tobias992 commented 5 years ago

I am not sure if i understand you correctly.

Only I can say: Before update last evening all was working fine and fast and after update all is slow.

But it Looks like you found the issue.

andryyy commented 5 years ago

It was just coincidence.

ntimo commented 5 years ago

The update indeed fixed the issue. I think we can close this :)

lunarthegrey commented 5 years ago

This is still happening for me with the latest update. Any ideas on how to fix it?

andryyy commented 5 years ago

It isn’t the QR stuff then but something else. A very large logo can cause this, too.

lunarthegrey commented 5 years ago

Hmm, maybe something was cached in my browser after the update. I don't seem to have the issue anymore.

dawoodjee commented 5 years ago

I setup mailcow in June (rules out the QR issue), my server is 8GB but still experiencing this issue. Admin UI takes about 15 secs

andryyy commented 5 years ago

Did you upload a large or bad compressed logo?

dawoodjee commented 5 years ago

I'm using an SVG which is about 4kb, but 512 x 512px

yeemail logo Capture

andryyy commented 5 years ago

Don't know then. I'd need to see this on the server.

dawoodjee commented 5 years ago

Thank you @andryyy

I dont understand why, but changing to a smaller PNG logo fixed the issue. My mailcow UI has never been faster!

andryyy commented 5 years ago

Strange. can you send me the SVG to info@servercow.de ? :)