You need to sign in to do that
Don't have an account?
Jim Anderson
5 connection limit to API, Application pooling in PHP
We are going to be using PHP to access the API and I was wondering how others have gotten around the 5 connection limit to the API. Are you using some kind of application pooling?
I have script that run updates on over 130,000 records that run on a cron script and they never fail
~ sfdcfox ~
Thanks for the info!
Do you know if you can do application pooling with PHP5 running on IIS. I dont see any info out there on it. I was thinking I could just write my own with a DB table. So as a request came in to access the api..it would check the table to see if there were 5 request already..is yes..it would loop until no..then insert a row..connect to the api...disconnect from the api when done..and remove the row.
For example, if both threads query the database at the same time, then commit an update at the same time, it is possible that you may overflow your connection limit. The correct method in this case would be to use an insert command that will fail if the maximum number of rows has been exceeded. Even so, polling is considered an inefficient and resource-intensive method that semaphores solves quite elegantly.
Try this link here: http://php.net/sem
They have the information you need to implement semaphores on the server of your choosing. I know very little of IIS, as I use Apache to run my personal web server. However, I am using a Windows system, which is supported by PHP for semaphores. However, I don't have PHP, either, I use Perl and Ruby. Best of luck with getting that to work. If I find anything else interesting, I'll let you know.
~ sfdcfox ~