How to run a similar php script concurrently at multiple browser?
hi all
i need help. I am currently doing a uptime manager to check for the uptime of all the sites in my database.
I'm using a php script to check the uptime using get_headers() and after getting the status, i will update the database with the status. there are too many sites in my database (1500 records) and it will take forever to finish the checking using one single php file. so what i do is split the 1500 records into 4 sets and run a similar php scripts in 4 browsers one time. e.g. (1st browser to check uptime for record 1 - 400, 2nd browser for 401 -800, 3rd browser for record 801 - 1200, 4th for 1201 - 1500) all this at the same time so as to minimise the total time needed to finish all sites.
The problem is though i open the 4 browsers at one go, only 2 of them seems to be processing, the rest of the browsers will queue and wait till the first 2 complete their processing, then start to process. How can I make it in such a way that all 4 browers will process the script concurrently without any queueing?
Does it involve the mysql settings or php settings? help! i'm very lost.
Greg K posted this at 15:39 — 7th September 2005.
He has: 2,145 posts
Joined: Nov 2003
Try using a different broswer, open 2 in IE, 2 in Firefox, etc. Perhaps all with the same browser it may be waiting to check if it needs to update cache?
Or perhaps the server you are using has limits on resources. I don't think it would be PHP or mysql. Are you running the same exact script in 4 browsers? try making 4 copies of the script, ie. script1.php, script2.php, script3.php, script4.php and load each of those in the different browsers?
That is all I have off the top of my head without knowing exactly how the script/server are set up.
Oh yeah, if you are using someone else's server (hosting company), did you ask them about it first?
-Greg
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.