Jump to content


Photo

Development Advice


  • Please log in to reply
1 reply to this topic

#1 zonequestz

zonequestz
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 24 October 2006 - 08:54 PM

I run a site that aggregates usage statistics for my subscribers blogs.  As my site has grown, close to 30,000 active subscribers, i've been having more and more issues with the amount of data that needs to be recorded. 

Here's how my site works:

The owner of a blog inserts a small javascript scriptlet.  In that script, it'll open up a reference to my website, which will then give my site control over generating all the necessarty statistics (ip address, time of hit, referrer, browser, etc, etc).

When this worker page is opened up, it'll tally up all the statistics needed and will then open up a mysql connection to my db to store the information.  The problem I've been running into is my site is opening up way too many mysql connections at the same time.  Setting the mysql_connections to some ridiculous amount just won't cut it.

Is there a way that I can keep one page running at all times, that'll keep a db connection open.  From there, everytime this worker page is referenced from my subscribers blog, it'll just use the connection that's already open as opposed to opening up it's own connection? 

Any advice would be beneficial.

Thanks,


#2 steviewdr

steviewdr
  • Moderators
  • Advanced Member
  • 1,364 posts
  • LocationIreland

Posted 25 October 2006 - 08:30 AM

look at mysql_pconnect

P.S. wrong place to post this query.

-steve




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users