I recently scaled up my application which uses a C#/.NET front-end and PHP scripts as web-crawlers as a back-end. Both sides of my application interact with a Xeround MySQL database (I am currently using Xeround Basic, but am considering moving to Xeround Pro). I have two related problems regarding unreliable access to the database.
- Occasionally I run a use_db call in my C# code to switch between two databases I've set-up. Occasionally, this call is made but not executed and the subsequent SQL call will fail. More frequently I'll run into a "Connection must be valid and open" message and will have to restart the application. Sometimes this is driven by leaving the application idle for many hours, but most of the time it seems caused by my overusing the application (which is strange as I'm only using ~20-30% of the available Xeround connections).
- The more complex problem is that my PHP scripts will return the target results close to 100% of the time if I am not running many routines (browser windows) at a time, but will fail often if I am running many routines at a time. Is this from overuse of Xeround (i.e. use_db calls being made but failing)? Is there some PHP setting I can play around with that treats each routine as using an independent server (I'm not using any global variables, so that is not the culprit).
I imagine question 1 is far easier to venture an answer for, but any feedback on these issues would be appreciated!
Thanks!