Question

prospect droplet better uptime woocommerce website

Posted July 27, 2021 132 views
UbuntuApacheWordPressDigitalOcean Droplets

Hi Digital Ocean community,

Today I uploaded a WooCommerce XML shopping feed (400 products) to the facebook business shopping catalogue and while doing this it made the website unreachable.

I assume it was unreachable because facebook was downloading the catalogue from the XML feed (can see facebook has uploaded the primary product image onto facebook).

Where in the apache logs can I find what caused the website to stop loading for users? It was timing out.

What can be done to prevent the DigitalOcean server being unreachable in the future? Would the droplet need upgrading? If yes what specs?

I was thinking about creating a new droplet solely for this WooCommerce website or upgrading the current one. The droplet its currently on has other website on it but they aren’t very demanding traffic wise.

This is the current droplet specs -

Ubuntu
1 GB / 1 CPU Shared
25 GB Disk

Looking at the create droplet options would a dedicated CPU be best? I think the $40 month CPU-Optimized droplet is best pricewise (cheapest) -

4 GB / 2 CPUs
25 GB SSD Disk
4 TB transfer

Or would a shared CPU with the other Intel / AMD CPU options be viable? For example Premium Intel with NVMe SSD for $24 -

4 GB / 2 Intel CPUs
80 GB NVMe SSDs
4 TB transfer

Would there be a noticeable difference between the shared CPU and the dedicated CPU?

Are both droplet options good enough to prevent the server from being unreachable as described above?

What droplet option can withstand the most traffic?

Thanks in advance to anyone that can answer any of these questions!!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi @twc8ac35a8636,

It sounds like you filled up your ApacheWorkers.

So first, what are Apache Workers and what are they used for:

Imagine you are in a cinema, and there are 300 chairs inside. Those are the Apache Workers and the movie is your Webiste. If someone wants to watch the movie(your website) they need to sit in the chair (Apache Workers). If all 300 chars are taken, the 301 person needs to wait for someone to leave in order for them to sit and watch the movie. That’s how ApacheWorkers work. Once all ApacheWorkers are taken, a new person that wants to open your website waits for a spot to be open and only after that they can see your website.

Usually, these limits are set by 256 by default but they can be increased.

You can open your Apache configuration file. In there you should see something similar to:

ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000

Increase both the ServerLimit and MaxClients options, restart Apache, and see if this would solve your issue.

It’s possible they do not exist (haven’t been added) and the default values are the ones above. Adding them to the prefork content of apache mods should be fine as well.

Don’t forget to restart Apache afterward.

Regards,
KFSys

  • Hi KFSys,

    Thanks for such a detailed explanation. For some reason I wasn’t notified of your reply and I only just read it now!

    I can’t find ServerLimit and MaxClients inside these files -

    apache2\apache2.conf
    apache2\httpd.conf
    apache2\mods-enabled\http2.conf
    

    Should I add those options to this file enabled\http2.conf?

    Also by how much would you recommend? Would doubling the default amount be ok? Like this -

    ServerLimit 512
    MaxClients 512
    MaxRequestsPerChild 8000
    
    • Hi @twc8ac35a8636,

      Yes, try adding it in there and then check your Apache status to see how it’s going.

      As for the amount. It’s very hard to say, it all depends on your Droplet, how well it’s optimized and how heavy is your website. Try adding 256 to the ServerLimit and MaxClients and see how your Droplet and Website will fare.

      • Thanks @KFSys I did what you recommended and am monitoring how the website performs now.

        sudo nano /etc/apache2/mods-enabled/http2.conf

        <IfModule !mpm_prefork>
            Protocols h2 h2c http/1.1
        
        ServerLimit 256
        MaxClients 256
        MaxRequestsPerChild 4000
        
        </IfModule>
        
        • hi @twc8ac35a8636,

          Great to hear that! How is it going, the monitoring I mean, any success?

          • Hi @KFSys the website appears to be coping with more traffic. I’m not feeling a delay in pages loading as much anymore.

            I haven’t tried uploading the catalogue to facebook again but I’m not experiencing any major delays in pages loading.

            If I was to upgrade to the dedicated server option whats the default max cinema seats?

            In theory the website will get more traffic round Christmas time and we want to futureproof it now rather than later.

            Looking at the Google Analytics the daily stats for the most users on the woocommerce site at the same time is about 8. On average the daily total traffic is 50 users.

            There’s 12 sites in total on this droplet.. is there a log / stat to see how many users have been on the droplet at the same time?

            Would the dedicated server load pages faster?

            Would the Google Page Speed Score detect more CPUs giving it a higher score?

Hi @twc8ac35a8636,

So, you can increase the Apache Workers as much as you like on a Droplet even if it’s not that powerful. If it will handle the traffic is another question. This solely depends on how heavy your websites are and how much CPU and Memory they require on a load.

So, how I proceed with such cases, I increase the Apache Workers until I notice some high load with the Droplet. Then I know it’s limit and lower the Apache Workers a bit. If that limit is not enough for you though, then thinking about upgrading your Droplet is the proper way to go!

As for the Google Insights, I don’t think it detects bigger Droplets and CPU utilization.

  • Sorry, forgot to mention how to check your Apache Workers and stuff like that.

    You can do it by executing the command :

    apachectl status
    

    It will show you all the information you need for your Apache service.