Re: [phpOpenTracker-general] very slow response for 1st hit when using phpopentracker
John Pye <[email protected]> Wed, 15 Mar 2006 11:33:07 +1100
| Newsgroups | gmane.comp.web.phpopentracker.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Richard, Not sure about Postgresql but, as I recall, in Mysql there is some effort made to defer the SQL 'INSERT' so that PHP doesn't have to sit around waiting for it to complete. Perhaps you need to also check your database tables are correctly indexed? Maybe it would be interesting to experiment with switching over to the 'web bug' style of reporting. This would help you to isolate where the delay is coming from, since in that case the page should load really quickly but the 1-pixel GIF would take a bit longer. It does sound as though a new session is triggering the delay; you'll need to track down where it's coming from in more detail. Perhaps add some logging of the time spent on database queries? Cheers JP Richard Green wrote: >Hi > >Using postgresql 8.1 for my database back end (optimized by increasing buffer >storage to 128MBytes). Hardware is good - SCSI drive, lots of RAM, no >swapping. > >My site takes several seconds (16s for php to genereate the HTML for a page) >to respond to the first hit to my site (similar for both directly call to >logging function and when using web bug). > >For subsequent hits to the site, the overhead is minimal (e.g. 0.054s for php >to generate html for a page). > >I think this relates to sessions, or the SQL query that takes place when there >is a new session. Restarting my browser (thus session cookie is removed) >causes the problem to repeat. > >- Has anyone seen a similar problem? >- Does anyone have any further optimization ideas? > >Thanks and regards >Richard Green >_______________________________________________ >phpOpenTracker-General mailing list >[email protected] >http://lists.berlios.de/mailman/listinfo/phpopentracker-general > > >