After working to get my company's codebase off their custom fork of vantiv (forked ages ago from 12.5.1) I discovered that new versions of vantiv/cnp-sdk-for-php (starting in 12.7.0) have file locking just before sending the request to vantiv. It was introduced at the same time as multi-site (which we don't use). But as a Payments Processor, we DO tend to process A LOT of payments, right around the first of the month.
Since the file name is dynamically generated based on the 0 element of stack trace, it will differ based on different file paths of the script location (handy for multi-site to prevent collisions between sites). But as a single site, predictably high volume in short spurts payments processor, this file lock is causing failures during higher volume times.
It seems the timing has to be impeccable by separate running processes, but process 1 opens the file, aquires the lock successfully, meanwhile process 2 opens the file, but fails to acquire the lock because process 1 hasn't released it yet. The method returns false (rather than the "requestTarget" array), and the httpRequest method doesn't have a valid URL to send to (with a subsequent php warning for trying to access an array element on false).
I would like to create an OPTIONAL setting to bypass file locking in order to handle high concurrency on a single site without random failures.
Pull Request: #55
After working to get my company's codebase off their custom fork of vantiv (forked ages ago from 12.5.1) I discovered that new versions of vantiv/cnp-sdk-for-php (starting in 12.7.0) have file locking just before sending the request to vantiv. It was introduced at the same time as multi-site (which we don't use). But as a Payments Processor, we DO tend to process A LOT of payments, right around the first of the month.
Since the file name is dynamically generated based on the 0 element of stack trace, it will differ based on different file paths of the script location (handy for multi-site to prevent collisions between sites). But as a single site, predictably high volume in short spurts payments processor, this file lock is causing failures during higher volume times.
It seems the timing has to be impeccable by separate running processes, but process 1 opens the file, aquires the lock successfully, meanwhile process 2 opens the file, but fails to acquire the lock because process 1 hasn't released it yet. The method returns false (rather than the "requestTarget" array), and the httpRequest method doesn't have a valid URL to send to (with a subsequent php warning for trying to access an array element on false).
I would like to create an OPTIONAL setting to bypass file locking in order to handle high concurrency on a single site without random failures.
Pull Request: #55