• Unfortunately, I seem to be having a reoccurring issue with my website when the site’s load is increased.

    If I get over 300 users on the site at one time, then the admin-side of the website becomes extremely slow. Eventually, as the users increase to 400,450,500 I cannot load any pages at all and cannot even load existing posts without ‘oops cannot be found’.

    My initial thought was that the issue was the server not coping. But then I loaded the website in a private window and it loaded almost instantly, without error.

    It has been suggested to me that the issue is only effecting logged-in users due to a caching issue. I note that is an option to ‘Don’t cache pages for logged in users’ and that is currently ticked – but it is recommended that I don’t untick this option.

    Could someone please advise on the best way forward? I run a breaking news website and once I publish a popular story, I am unable to provide any updates/changes until the website traffic dies down.

    Should I untick ‘Don’t cache pages for logged in users’, or maybe tick ‘ Don’t cache pages for following user roles’ and select administrators?

    Any advice is much appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Ben

    (@benbornschein)

    Hi,

    when you enable “Don’t cache pages for logged in users” the system do all the processes which WordPress executes when no caching plugin is active. If you disable this option and the caching plugin doesn’t separate visitors and logged in users you will have the issue that a regular visitors sees stuff like the profile bar on the top of the page.

    Some caching plugins don’t cache pages for logged in users but still deliver the cached page. This is in many cases a good solution but if a logged in user needs access to something like a profile page no caching plugin can do that out of the box. In such a case you need a caching plugin that allows you to have dynamic content in static files. But this also requires a lot of programming skills.

    Of your 300 users how many are logged in? Do you use other plugins like “Types” which can slow down your backend? Do you have many categories? How many posts/pages do you have? What are your caching settings in W3 Total Cache?

    Thread Starter darrentoogood

    (@darrentoogood)

    Hi Ben,

    Many thanks for getting back to me.

    I am the only logged-in user when the issue occurs – all other visitors to the website are simply browsing.

    I currently have 12,177 posts with 68 pages.

    Is this a server issue, or is it a caching issue? I’m at my whits end.

    Ben

    (@benbornschein)

    Can you post your server specs? Memory, HDD/SDD, CPU, managed server/vserver/root server?

    Thread Starter darrentoogood

    (@darrentoogood)

    Of course, although I have been assured the server specs should be able to easily cope with much, much more traffic than 300-500 visitors at a time.

    VPS Server – Linux
    Memory: 8GB
    HDD: 80 GB SSD Storage w/Raid 10
    CPU : 4 CPU Cores
    Bandwidth: 6TB

    Ben

    (@benbornschein)

    If you have access to your MySQL config (if you have root access), you can set this settings for better database performance:

    max_connections = 150
    max_user_connections = 100
    query-cache-type = 1
    query_cache_size = 32M
    query_cache_limit = 2M
    tmp_table_size = 32M
    max_heap_table_size = 32M
    table_open_cache = 512
    binlog_cache_size = 16M
    innodb_buffer_pool_size = 1G
    innodb_buffer_pool_instances = 1

    It is possible that the database is the bottleneck.

    Thread Starter darrentoogood

    (@darrentoogood)

    Thanks Ben, I will look into it.

    Surely ‘max connections’ set to 150 will not permit a great number of people onto the website?

    Ben

    (@benbornschein)

    I have forgotten to ask, how long is your cache lifetime?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Caching for logged-in users’ is closed to new replies.