|
So, I've spent the last 3 days trying to hunt down a bug amongst 1000's of lines of code. Comes down to this: I have an instance of MySQLi which is created when the script first runs. It performs lots of calculations and then gets to a cURL call. The cURL call takes > 60 seconds to run and the MySQLi connection "goes away" (MySQL message). There are dozens of cURL calls and 100's of queries. This is a product which is installed on a variety of servers.
What would you do?
I've been thinking about:
1) Each time after a cURL call is made, check for the connection and re-establish it if it's there. This requires me to execute a SELECT 1+1 query to see that the server connection is gone and that seems a bit much to me to do dozens of times per script run.
2) Each time a query is done, I could do the same check, but that gives a worse problem.
I'm clueless, so any advice is very much appreciated.
__________________
Jeremy Miller
Please login or register to view this content. Registration is FREE
|