Search is slow when switching from DEV to Production

We checked our php execution time within our search template. To make sure that there wasn’t an issue with it.

The development site was actually slower in the PHP execution test. Although the production was faster in processing php execution. It took about 8 to 9 seconds to load the search.

On the development side our search took about .5 to 1 second to load. It’s extremely fast.

The site was moved over in its entirety to production

Does anybody have any idea why search might be running slow on production. Maybe Kirby is using scandir or something like that, which our server is not handling well. Any recommended test or scripts we can run to diagnose the issue.

Thanks

It’s definitely true that servers with SSDs are performing better than ones with hard drives. But that shouldn’t make the search 9-15 times slower. Have you tried commenting out the search code to test if the search is really the part of the code that’s taking so long?

So that is a solid SSD server. When watching Tail, it just pauses, almost like it’s in a queue. Then after about 5 to 10 seconds, you’ll see the search process then it returns in Tail and you see it process on the screen. I’m not sure what you mean by commenting out the search. The rest of the site is fast.

That’s interesting. How many pages does your search run through?

Not many. I looked into that as being a possibility. The unusual thing is that on our test server, it works fine. We cut it down from like 20k to around 2k. They are not that deep. Parents don’t have a lot of children. The search was sped up a little when we cut out all those pages. It was still fast. It’s just now it takes a really long time and is on a server that’s faster. When running a php execution test on the search page it turned up like 4.6 e-7 and on the test server 7.3 e-7

So the live server seems to be processing php faster than the test server.

To be honest I have no idea what the issue could be. You could try searching through something like 10 pages. If that takes about the same time, it’s something else.