{"action":"opened","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/7499","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/7499/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/7499/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/7499/events","html_url":"https://github.com/cakephp/cakephp/issues/7499","id":109398628,"number":7499,"title":"Intermittent crashes when connecting to SQL server","user":{"login":"MCF","id":223530,"avatar_url":"https://avatars.githubusercontent.com/u/223530?v=3","gravatar_id":"","url":"https://api.github.com/users/MCF","html_url":"https://github.com/MCF","followers_url":"https://api.github.com/users/MCF/followers","following_url":"https://api.github.com/users/MCF/following{/other_user}","gists_url":"https://api.github.com/users/MCF/gists{/gist_id}","starred_url":"https://api.github.com/users/MCF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MCF/subscriptions","organizations_url":"https://api.github.com/users/MCF/orgs","repos_url":"https://api.github.com/users/MCF/repos","events_url":"https://api.github.com/users/MCF/events{/privacy}","received_events_url":"https://api.github.com/users/MCF/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-01T22:39:53Z","updated_at":"2015-10-01T22:39:53Z","closed_at":null,"body":"I am seeing intermittent crashes when connecting to SQL server.  There are no PHP errors thrown, the sqlsrv driver seems to be crashing.  Here is the information from the Windows event logs:\r\n\r\n```\r\nFaulting application name: httpd.exe, version: 2.4.16.0, time stamp: 0x55a22a64\r\nFaulting module name: php_pdo_sqlsrv_56_ts.dll, version: 3.2.0.0, time stamp: 0x54f4b646\r\nException code: 0xc0000005\r\nFault offset: 0x00014926\r\nFaulting process id: 0x854\r\nFaulting application start time: 0x01d0fc91fac8f4fc\r\nFaulting application path: C:\\Apache24\\bin\\httpd.exe\r\nFaulting module path: C:\\PHP\\ext\\php_pdo_sqlsrv_56_ts.dll\r\nReport Id: 3f966aa0-6885-11e5-be5e-180373b9ebbe\r\n```\r\n\r\nI am using:\r\n\r\nWindows 7\r\nPHP 5.6.13\r\nApache 2.4.16\r\nCakePHP 2.7.3\r\nMicrosoft's sqlsrv pdo driver version 3.2\r\n\r\nThe crashes happen when making a connection to the database.  More precisely At this line:\r\n\r\nhttps://github.com/cakephp/cakephp/blob/2.7.3/lib/Cake/Model/Datasource/Database/Sqlserver.php#L135\r\n\r\nAs mentioned previously the problem is intermittent and highly variable.  It is not easy to reproduce as a result.\r\n\r\nThe crash information does seem similar to this older issue: https://github.com/cakephp/cakephp/issues/2003\r\n\r\nAs suggested in that older issue I've set the database connection to `persistent => false` in an attempt to solve the problem.  So far it seems to have fixed it, although I've only spent an hour testing the legacy application I am upgrading to 2.7.3.  I will continue to test and report back in a few days.\r\n\r\nI have not looked in detail at what the persistent flag is affecting with respect to the sqlsrv connection.  Any comments on what this is doing (or if it is actually doing anything) are welcome."}}