I have a wordpress website built with roots/sage9.
The website is a little bit particular, because our client “opens” the website once a week, 6.30pm, until 20 items are sold. It’s pretty faster, because a lot of users are ready to buy.
After 20 items are sold, or when it’s 00.00pm, we block automatically the shopping.
The problem is the infra server, as we didn’t know the flux of users at 6.30pm every week and as the budget of the client was limited, we put the code source on a shared server. Of course, after 3 minutes, the website was down …
Now, we migrated on an a VPS with 2CPU/4Go de ram (handled by a third business party - 40$/month) …
We simulated a test charge with 300 simultaneous users … the server doesn’t seem enough yet.
I can’t evaluate what we need. A lot of people said that wordpress is extremely greedy when there are a lot of users.
The wordpress is classic :
woocommerce
wpml
ACF
yoast
I just put wp-fatest-cache now.
I put google analytics for the next sell to know the realtime user at the opening.
On each page, there is a countdown timer for the next sell + the number item on the cart icon, so I fetch some data through an ajax request to retrieve :
nb product in the cart
the next opening datetime
I don’t know if i’m very clear with my problem, I think the real problem is the infra.
The host could not say, just said : PHP process is saturated.
The load test was done by the new hoster, when he ran the test, I could check on its grafana admin.
We saw that the CPU was on 100%. And the load charge increased a lot.
You should get / request much more debug info then this – without the detailed error message you’ll loose valuable time debugging (IMHO).
What does the PHP / Nginx config look like?
Did the (v)users actually do anything on the page or just GET the resources? Any server will go down at some point… Since the business revolves around generating / encountering traffic spikes I would also look at caching mechanisms like FastCGI caching.
Anyway, I changed the hosting, becasue of the support.
It’s php 7.2 , mysql 5, apache.
Yes for now, I put a google analytics for the tomorrow selling. To know exactly how much user.
For now, there is just a WP Fatest cache plugin. So yes, we could imagine to add a real cache system.
I was thinking about the detailed specs like max_execution_time etc. – you should look into the settings to see if there is a bottleneck and whether you can tweak / optimize the performance.
Eliminating all the other requests / hits and focusing on the actual shop stuff should prove very useful…
If the current server is enough, it could be too expensive in a long term for my client. (so managed server - 75euros+20 for saving system)
The ideal will be to have a scalable server as we know on AWS. But i can’t manage this.
The ideal will be all the week an intermediate lighter server and for the opening day (wednesday) the big one ^^ … but the current hoster can’t do that for now … ^^’