From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: jay.medivh@gmail.com
Subject: BUG #15459: no connection to the server
Date: Fri, 26 Oct 2018 05:33:29 +0000
Message-ID: <15459-fb1c298d2650618a@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15459
Logged by: medivhJay
Email address: jay.medivh@gmail.com
PostgreSQL version: 9.6.8
Operating system: debian
Description:
Hello
I used php7.1 + PDO connect to postgresql
when I use fork , like this
<?php
$pid = pcntl_fork();
if ( $pid === 1 ) {
TaskManager::log('error');
} elseif ( $pid ) {
pcntl_wait($status);
} else {
try {
call_user_func_array($func, $argv);
} catch ( \Exception $e ) {
TaskManager::log($e);
}
exit(0);
}
PDO throw an exception
like this
[2018-10-26 13:12:02] PDOException: SQLSTATE[HY000]: General error: 7 no
connection to the server in
if I don't use pcntl_fork , nothing
I don't know how to fix it , I need your help
Thank you!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, jay.medivh@gmail.com
Subject: Re: BUG #15459: no connection to the server
In-Reply-To: <15459-fb1c298d2650618a@postgresql.org>
References: <15459-fb1c298d2650618a@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox