You are here: Re: server response slowing down « PHP Programming Language « IT news, forums, messages
Re: server response slowing down

Posted by Erwin Moller on 12/16/50 11:54

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@spamyourself.com> wrote in
> message news:44d08c5e$0$4525$e4fe514c@news.xs4all.nl...
>> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация