Server eventually crashes when I'm performing lots of sql queries?
... at least thats what I'm suspecting?
I havent used mysql_close(); on all of my documents... but my server seems to slow down, and then grind completely to a halt when I'm using my coding and designing this management system.... im using a lot of sql queries - would that affect anything?
Eventually i just get a page cannot be displayed error?
sounds like you're getting a mysql query stuck in an endless loop. normally when a connection is no longer used it will close itself, so mysql_close, while a good idea to use, probably wont fix your problems..
what usually happens is you get mysql query stuck into an endless loop and once your memory is used up, the remaining queries end up in a buffer waiting their turn, eventually you run out of memory and server comes to a crashing halt. (MySQL crashes, followed by apache, and then the only thing you can really do is ping the server (meaning you have to reboot it)
sounds to me like you need to re-think your code and re-design it...
put a pause on mysql queries, and if you have a big table full of data, dont try to SELECT * WHERE all at once- paginate it, using SELECT LIMIT...
Ive seen it happen numerous times on many servers.. bad code causing server crash..
a php script may time out, but a mysql query stuck in an endless loop won't stop until the server crashes. you need to break the loop, and the best way to do that is use SELECT LIMIT and optimize your sql queries.