PDOExeption SQLSTATE [HY001] Unable to allocate sufficient memory

When I ran the following code with php-fpm:

$connect = new PDO("dblib:host=mssql.dev.gm.local;dbname=GeoData","username","password");

try{
    $s = $connect->query('[RU].GetTownInfo 4368');
    var_dump($s->fetch());
}catch (Exception $e){
    var_dump($e->getMessage());
}

I get an exception:

PDOExeption SQLSTATE [HY001] Unable to allocate sufficient memory

But when I run the same code from the php command line, I have no such problems.

What could be the problem?

I am using nginx proxy_pass for the backend (php-fpm).

To connect to MS SQL Server I use Dblib (freetds). All work on the same machine with OpenVZ, Nginx and Php-fpm are different virtual machines.

The php-fpm configuration for the command line and upstream is the same.

+4
source share
1 answer

Does the system tell you that the problem is correct?

PDOExeption SQLSTATE [HY001]

, php , php.ini:

memory_limit = 128M

0

Source: https://habr.com/ru/post/1661460/


All Articles