• Resolved slservice33

    (@slservice33)


    I have a strange problem when I host 2 wordpress sites on my server. Always either one site or the other is always very slow loading wp-admin pages.

    The last site to receive updates is always the fastest site. Immediately one site receives an update then that is the fast site and the other site becomes the slow one.

    I have confirmed this with query monitor plugin which shows wp-admin pages are around 50mb peak memory for the fast site and 150mb peak memory use for the slow site. (always)

    Any ideas what could cause this ?
    Maybe something to do with 2 sites having the same IP address loading wp-admin pages and externally requesting something from wordpress ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Are you hosting this on a dedicated server at a hosting company?

    Thread Starter slservice33

    (@slservice33)

    Hi, its my own apache server that serves only these 2 wordpress sites.

    The issue immediately switches between the 2 sites after updates, and only effects wp-admin pages with everything else working well.

    So I thought maybe an issue when the admin pages connect to external sites ?

    The WordPress backend does not automatically connect to external services. I would rather assume that it is a problem with the database queries. So here are a few tips:

    You could try deactivating all plugins and then observe the behavior. It is probably due to one or more of them, because WordPress alone is quite sparing with database queries.

    It might also be useful to take a look at the error log.

    Also take a look at the anomalies mentioned under Tools > Site Health.

    If you have monitoring on the server, take a look at how many database processes are active.

    Thread Starter slservice33

    (@slservice33)

    Thanks. According to ‘top’ there is only ever one mariadb process running.

    Site health looks good.

    Nothing in syslog or PHP error log but I might try enabling mariadb slow log.

    I’ve asked a question on Query Monitor Plugin to see how the number of Database Queries can stay the same but the Peak Memory Use is 100mb higher for the same page load ? That might lead somewhere …

    Thread Starter slservice33

    (@slservice33)

    I’ve found the reason. Opcache memory was full and so was only working for 1 site at a time.

    Using the plugin WP OPcache I can see what opcache is doing.

    Then for my server I edit the opcache config file which in my case is 
    sudo nano /etc/php/8.1/cli/conf.d/10-opcache.ini

    I added these settings:
    opcache.memory_consumption=512
    opcache.interned_strings_buffer=64
    opcache.max_accelerated_files=32500
    opcache.revalidate_freq=60
    opcache.enable_cli=1
    opcache.enable=1

    restart php which in my case is 
    sudo service php8.1-fpm restart

    and both sites now work the same.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.