Jump to content

Archived

This topic is now archived and is closed to further replies.

zonequestz

Development Advice

Recommended Posts

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,

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.