Hi guys
Im developing a station logger application.. and i've ran into some problems..
the station logger system is actually a 3 part system..
1) CLIENT SOFTWARE - deployed on all stations that needs to be controlled
developed in FLASH 2006
2) CONTROL SOFTWARE - the software that checks / controls the CLIENT SOFTWARE
developed in FLASH 2006
3) SERVER UNIT - windows XP with apache, php, and mySQL installed.. this unit holds all the information
Intel Celeron 1.5Ghz, 512MB RAM
My system is fairly simple.. CLIENT SOFTWARE running on the computers calls a PHP SCRIPT via GET method every 3 second interval on the SERVER.. the PHP SCRIPT retrieves that particular computer's status (OPEN, CLOSE, OFF) and RETURNS it
eg. echo "&stat=open&";
Depending on what the script returns, the CLIENT SOFTWARE acts.. if it retrieves OPEN it "unlocks the desktop of that particular unit".. if it's CLOSE then it locks it down..
the CONTROL SOFTWARE is the one that administers the mysql database.. like the CLIENT SOFtWARE the CONTROL SOFTWARE simply calls php scripts on the SERVER UNIT to retrieve information about the status of the CLIENTS, as well as sets the unit's mode in the database with the desired setting..
all was well during testing.. untill i deployed the CLIENT SOFTWARE to ALL the computers in the network (40 stations)
My CLIENT SOFTWARE keeps getting errors.. (for when it does not receive the right data from the server, or if there's a server error)..
I opened the PHP script that gives the status directly in my browser and found out that 3 out of 5 times (refreshing the page) i get the following error:
Can't connect to MySQL server on 'localhost' (10048)
also observing the CPU usage on the SERVER, i am getting constant 70% CPU
which brings me to the conclusion that this error is could be because of TIME OUTS due to the server being too busy processing many requests...
BUT.. is 40 requests TOO MUCH? i would have thought that apache (or MySQL) would be able to handle more than that? also.. The computers with CLIENT SOFTWARE are only sending and receiving about 1kb of data MAX.... that's 40KB only on LAN..
What do you think of my situation guys? can you guys think of anything wrong with my setup? perhaps a better server unit? how about loosening the CLIENT SOFTWARE GET METHOD request from 3 second interval to 5 seconds?
i still think 40 simultaneous connections should be easy for apache 1.3 and mySQL 3.23 on an Intel Celeron 1.5Ghz with 512MB of RAM.. dont you think?
any help would be very much appreciated..