For a year, an online store with about 1700 products on a VPS stalled every few days. Each time, a server restart helped, and a few days later it all happened again.

What we measured #

We had no access to the server, so we measured the store from the outside, as a visitor would:

  • Product category: 0.1 seconds. It comes from the cache.
  • The same category sorted by price, filtered or with a search in the address: 1.6 to 6 seconds. As soon as the address gets a parameter, the cache is skipped and the server builds the page from scratch.
  • 404 page: 2.7 seconds. It wasn't cached either.

Why a restart helps, but the stalls come back #

There are a huge number of such addresses. 96 categories, six sort orders, up to 41 pages per category and a filter that combines brands and models add up to tens of thousands of addresses, and none of them is cached. Bots crawl them one after another. Googlebot skips the “Add to basket” links because they are marked not to be followed, but AI bots and price-scraping tools ignore that marker.

A VPS has a limited number of PHP processes that can build a page at the same time. When bots take them all, there are none left for customers and the store stalls. A restart frees the processes, and everything works until they fill up again a few days later. It isn't a fault but saturation, and that is why it keeps coming back.

How to fix it #

The fix has two parts. The first is in WordPress:

  1. Disallow addresses with sorting, filters and add-to-basket in robots.txt. This store had only two rules, and neither covered those addresses.
  2. Configure the filter plugin.
  3. Cache the sorted pages and the 404 page as well.
  4. Clean up the WooCommerce sessions table, which grows with bot traffic.

The second part is on the server: bot traffic has to be stopped before it reaches PHP. Sorted and filtered addresses are served to a customer who is already on the site, and a bot that isn't a verified search engine gets nothing. Only whoever manages the server can set that up. Until that is done, the first part only helps partially.

What you can check yourself #

  • Speed of a sorted page: open a category, then the same category with ?orderby=price at the end of the address. If the second one opens several times more slowly, the cache doesn't cover sorting.
  • robots.txt: open yourdomain.hr/robots.txt and look for rules for orderby, filter_ and add-to-cart.
  • The pattern of the stalls: if a restart always helps but the stalls come back within a few days, ask whoever manages the server how many PHP processes are busy at the moment of a stall and what is using them.