Jump to content

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,
Link to comment
https://forums.phpfreaks.com/topic/24981-development-advice/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.