title: PDOExeption SQLSTATE[HY001] Unable to allocate sufficient memory
body: <p>When i run bellow code from php-fpm:</p>
  
  <pre><code>$connect = new PDO("dblib:host=mssql.dev.gm.local;dbname=GeoData","username","password");
  
  try{
      $s = $connect-&gt;query('[RU].GetTownInfo 4368');
      var_dump($s-&gt;fetch());
  }catch (Exception $e){
      var_dump($e-&gt;getMessage());
  }
  </code></pre>
  
  <p>I get Exception: </p>
  
  <blockquote>
    <p>PDOExeption SQLSTATE[HY001] Unable to allocate sufficient memory</p>
  </blockquote>
  
  <p>But when i run the same code from php command line, i don't have such problems.</p>
  
  <p>What can be the problem?</p>
  
  <p>I use nginx proxy_pass to backend(php-fpm).</p>
  
  <p>To connect to MS SQL Server i use Dblib (freetds).
  All works in one machine with OpenVZ, Nginx and Php-fpm are different virtual-machines.  </p>
  
  <p>Php-fpm config for command-line and upstream are the same.</p>