mysql persistent connection

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zonequestz
Forum Newbie
Posts: 1
Joined: Tue Oct 24, 2006 3:38 pm

mysql persistent connection

Post by zonequestz »

Here's the scenario:

I run a tool that aggregates statistics for my subscribers blogs. They insert a small js scriptlet into their blog, which then opens up a connection to my website each time a page is loaded on their blog. Each time this connection is opened, a mysql connection needs to be opened.

Page reference that gets inserted a blog:
http://www.mysite.com/input.php

question

Let's say about 100,000 users have this scriplet live on their blog at all times, you could imagine the amount of mysql connections that can be opened at one time. Is there a way I can keep the page input.php running at all times, sort of like a port that keeps just one connection open to the mysql db. This way only one connection needs to be opened but can just take on the requests of all the several different referrers at once?
Post Reply