Context: Using 4 or 5 'mirrors' of os-commerce shopping cart (to keep any one site from getting to busy).
Content: I want to do the above, and send data from all four 'stores' towards a single PHP affiliate script. Testing (in a 'quite' environment) the affiliate script credits sales when the customer reaches the 'Thank You' page (no problem).
-If the script and database get busy (in the real world), can incoming data be 'held' until the database can react?
-I know the answer 'depends on the program', just in general (the shopping cart is not waiting for a response from the affiliate program) what happens to the 'PHP transfered' data if the MySQL database is 'busy'?
Thanks
MGH
Will a script 'take a message' when the database is busy?
my knowledge is not huge about PHP but as far as i know, using php its not possible to do, maybe there should be some kind of extension for server's software (for apache of any other programm)
Only i can suggest you to make a script that redirect's user to random site (one of your) or something like that.
Sorry that i cant realy help you...
Only i can suggest you to make a script that redirect's user to random site (one of your) or something like that.
Sorry that i cant realy help you...

It's cool. In case someone wants to know here are some interesting answers from a 'Webmaster forum':Lixas wrote: Sorry that i cant realy help you...
^^^^^^^^^^
>What happens to information which gets sent when the >MySQL database is 'busy'? In general (not specific to >any one program), does incoming data get 'saved' in a >queue, or dumped, when the server is busy? (in other >words the os-commerce cart is not waiting for a response >to the script)
>Anybody have real experience?
Yeh I looked at this for a previous employer (for a registry)
Mysql (as normaly used on the web) is quite dumb a transaction has to run in real time there are ways to have asynchronous queues of transactions so that a system can fire off an insert even if the receiving system is down or busy .
A quick search doest show any tools for mysql (if you have mysql 5) you could look at using triggers/ on the sales cart database to update the affiliate database rather than relying on the thank you page.
You could Roll your own
By using triggers or the thank you page script to generate sql transactions as xml files. save these to a directory outside of the webserver root and write some process (in perl/php etc) that executes every 10 min to read these files and insert the info into the affiliate database.
Or use a database with Queuing support postgress appears to support this which if you shopping cart supports it would be the best way to go
^^^^^^^^^^^^^^^^^^^^^
MySQL should be able to keep up with 5 sites. I recently set up a site with 120+ WordPress blogs, the database was doing in excess of 500 queries per second (mostly read) last time I logged in.
It's all in the db tuning -- making sure the db has what it needs to execute quickly. MySQL is very fast, but if (for example), you have 2000 tables and only let the db open 64 files at once, no db will run efficiently.
If you run out of connections, you get an immediate error. If a query takes a long time, the application (ie PHP/oscommerce) blocks until the data returns. This means that the user will see slow loading.
^^^^^^^^^^^^^^^^^^^^^^^
'You can learn a lot from a dummy'

MGH