Re: server response slowing down



Chris Thompson wrote:

Hi Erwin,

Thanks for this, but if I start at question 20, and navigate backwards to
question 1, it still starts to slow down at question 5, so doesn't seem to
be the answer...

If that is true depends on the (mistakes in) underlying code.

I think nobody can answer this question without more information/code.

I expect your code is somehow doing more and more work as it handles more
questions.
Why else show question 5 the first time be quick, and after 15 subsequent
question become slow?
It sounds like all old given answers are somehow reinserted each time or all
questions are re-queried, or something like that.

Show us some relevant code or describe in detail how your application is set
up.
I cannot think of any valid reason why the database or your script gets slow
if you design the application in a normal way. Must be some mistake
somewhere in the logic.

Regards,
Erwin Moller




Cheers anyway,
Chris.



"Erwin Moller"
<since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx> wrote in
message news:44d08c5e$0$4525$e4fe514c@xxxxxxxxxxxxxxxxx
Chris Thompson wrote:

Hi All,

I have a private website created using HTML/PHP. Within this site,
there is a page that has a form (question.php), which is populated
depending on the question number that has been posted to it.

When the form is submitted, the data is posted back to the same page
(question.php), and the code within the page saves the posted data, and
displays the next question, and so it goes on...

While the page loads almost instantly for the first 15 or so questions,
the server response gets gradually slower, to the point where the page
takes about 30 secs to start loading after about 18 questions.

I'm trying to understand what may be causing the lag... It doesn't seem
to be the loading of the page that's taking the time, it's the response
time from the server before the page starts loading that seems to
increase.

The page does use MySQL tables, but all are well indexed, and as I say,
you can load the page about 15 times, before any noticeable delay starts
to happen.

Anyone any ideas please?

(I've put the complete site on 2 different servers - 1 on a shared
hosting
account, and 1 on completely different managed server, and the same
thing happens on both servers!?).

Thanks,
Chris.

Hi Chris,

That indicates that your script has a higher workload the higher the
questionnumber is.
That could indicate that the script is doing more work for question
number 20 than for question number 1.

Do you only perform the quesries needed?
Are you maybe 'counting' by doing subsequent databasequeries untill you
pulled the 'right' question from the table(s)?

Regards,
Erwin Moller

.



Relevant Pages

  • Re: server response slowing down
    ... the server response gets gradually slower, to the point where the page ... takes about 30 secs to start loading after about 18 questions. ... That indicates that your script has a higher workload the higher the ... That could indicate that the script is doing more work for question number ...
    (comp.lang.php)
  • Re: server response slowing down
    ... the server response gets gradually slower, to the point where the page ... takes about 30 secs to start loading after about 18 questions. ... That indicates that your script has a higher workload the higher the ... That could indicate that the script is doing more work for question number ...
    (comp.lang.php)
  • Re: Help - PHP5 with IIS5 on WinXP SP2 Pro
    ... Polaris wrote in news:4145dccf$0$62367$5fc3050@dreader2.news.tiscali.nl: ... > Does the server give the complete text of the browser.php script? ... loading. ...
    (alt.php)
  • Re: imagettftext problem
    ... monomaniac21 of comp.lang.php make plain: ... Have you tried loading the script, on the non-working server, directly? ...
    (comp.lang.php)
  • Re: action="">
    ... zoilus wrote: ... server. ... Why don't you just fill in the name of the script you want? ... Erwin Moller ...
    (comp.lang.php)

Loading