[Solved] NC12 slow with multiple domains

Nextcloud version (eg, 10.0.2): 12.0.3 (Problem exists since 12.0 alpha)
Operating system and version (eg, Ubuntu 16.04): CentOS 6
Apache or nginx version (eg, Apache 2.4.25): 2.2.15
PHP version (eg, 5.6): 7.1.7
Is this the first time you’ve seen this error?:

Problem exists since commit

Can you reliably replicate it? (If so, please outline steps):
nextcloud with multiple trusted domains
slow, when multiple domains are used
on test system, multipe times load url from domain A is fast, multiple times from domain B is fast, but every change between domains is slow, multiple seconds to wait

The issue you are facing:

Slow, when multiple domains are used

On test system I switched between this commit and commit before. commit before the duration of page load is constant, whatever hostname is used. after this commit every first page load from domain is slow (6-8 seconds), repeated page loads from this domain are constant (400 ms).

(page loads measured with curl in bash-script)

my production system is not at uberspace.de, but behavior is the same.

Problem disappears, if I send the same fake-host-header to php-instance (but have other problems then).

This is detailed, thanks. Have you already raised it as an issue on GH too?

Not yet raised an issue.

Output of my bash-script (time in ms):

TestA 4618
TestA 459
TestA 460
TestA 468
TestB 4353
TestB 473
TestB 441
TestA 3796
TestB 3888
TestB 437
TestA 5026
TestA 462
TestA 476
TestA 467
TestA 418
TestB 4815
TestB 563
TestB 549
TestA 3985
TestA 488
TestA 480
TestA 487
TestA 463
TestB 4076
TestB 456
TestA 4028
TestB 5167
TestB 591
TestB 585
TestB 439

There is no need of discussing it here, just copy it in a bug report on github. Then you can also ping @MorrisJobke

Note that Morris is on holiday starting yesterday, no access to internet at all (!) for 3 weeks :wink:

Filed an issue:

The problem persists with 12.0.4.

I tried to use separate php-fpm-pools, separate document-roots - nothing helps.

Two complete different Installations on same machine do work - but if two hostnames on same machine share the same database and same data-dir, the access over two hostnames is very slow. API-access and ajax is fast, only pages with theming are affected.

Fixed: https://github.com/nextcloud/server/commit/67702136494b9b355e99c0960ee36accd5e97b85

1 Like