Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4609586
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:00:32+00:00 2026-05-22T01:00:32+00:00

I’m running into a strange issue…. This all worked fine last night when I

  • 0

I’m running into a strange issue…. This all worked fine last night when I coded the damn thing, but I reinstalled WAMP on my local dev server and now I’m running into problems.

I’m attempting to retrieve results from Sphinx through the PHP api. I’m just executing the most basic of queries as a test…

    $searchtest = Sphinx::factory();
    $results = $searchtest->Query('');

And $results contains the sphinx results as expected

...
[total] => 1000
[total_found] => 30312
[time] => 0.004

However, when I profile this small piece of code, it’s telling me that PHP is taking an extra second to process the query!

test (1) - 1.066703 s

The problem gets worse on my production code which runs several Sphinx searches, yesterday… everything was running fine and each search took 0.004sec (or an equally small amount of time) but today, the page takes several seconds to run all the search queries! (this is on an isolated dev server, so no traffic issues)

results (1) - 1.046128 s
sidebar_data (1) - 10.388812 s
featured (1) - 1.034211 s

Each separate query to the Sphinx daemon takes an extra second to come back! (sidebar_data hits the search server 10 times)

What is going on here? I’ve wasted a bunch of time trying to figure it out and I’m stumped. I even reinstalled Sphinx from scratch. Since sphinx itself is reporting [time] => 0.004 fast access times, is the problem something to do with PHP?

What should I do to diagnose the problem?

Edit: I looked at the output from searchd –console, sure enough, it confirms that the search queries are quite quick to run, but if you look at the time, they are being executed approx. one per second… PHP is causing some delay somehow(??)

[Sun May  8 09:57:29.923 2011] 0.012 sec [all/1/ext 15039 (0,25)] [main]
[Sun May  8 09:57:30.996 2011] 0.020 sec [all/1/rel 30 (0,20) @city] [main]
[Sun May  8 09:57:32.034 2011] 0.016 sec [all/1/rel 50 (0,20) @make] [main]
[Sun May  8 09:57:33.061 2011] 0.015 sec [all/1/rel 15 (0,20) @style] [main]
[Sun May  8 09:57:34.099 2011] 0.017 sec [all/1/rel 25 (0,20) @colour] [main]
[Sun May  8 09:57:35.122 2011] 0.009 sec [all/1/rel 1 (0,20) @field] [main]
[Sun May  8 09:57:36.145 2011] 0.011 sec [all/2/rel 1 (0,20) @field] [main]
[Sun May  8 09:57:37.174 2011] 0.010 sec [all/2/rel 1 (0,20) @field] [main]
[Sun May  8 09:57:38.187 2011] 0.003 sec [all/2/rel 431 (0,20)] [main]
[Sun May  8 09:57:39.240 2011] 0.005 sec [all/2/rel 12627 (0,20)] [main]
[Sun May  8 09:57:40.292 2011] 0.005 sec [all/2/rel 13021 (0,20)] [main]
[Sun May  8 09:57:41.343 2011] 0.001 sec [all/3/rel 200 (0,20)] [main]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:00:33+00:00Added an answer on May 22, 2026 at 1:00 am

    At a first look I’d have guessed some kind of DNS resolution problem could be involved but it seems like your running searchd on the same host as PHP

    Rather than poke around trying to guess what is causing this I would recommend profiling the PHP code running on the machine. I would install xdebug, enable profiling and then analyse the output in webcachegrind. It should be able to point you to which functions are slow to run and give you a better clue as to what’s wrong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6
I have a text area in my form which accepts all possible characters from
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.