I have some sort of web crawler with PHP, which crawls the web and stores information about the pages in the database, now the thing is, loading pages takes a lot of time, and on top of that my script sleeps up to 5 seconds between each request, meanwhile the connection to MySQL server is still open, I end up with way too many sleeping MySQL processes.
I was thinking, since each instance of my script lives for about 20 seconds, and makes no more than 3-4 MySQL queries, it might be better performance-wise to close the connection to MySQL and re-open it with every query, I thought before I waste my time editing the code I could ask for your advice on this matter, am I making any sense?