General discussion on using the Kognitio Analytical Platform.
Single Poster
User avatar
Posts: 1
Joined: Thu May 12, 2016 2:04 pm

PHP ODBC PDO Communications link failure: Broken Pipe

by SolStis86 » Tue Feb 28, 2017 12:49 pm

When using PHPs PDO connector with unixODBC im getting the following error:

SQLSTATE[08S01]: Communication link failure: 0 [Kognitio][WX2 Driver] Communications link failure: Broken pipe (SQLPrepare[0] at /builddir/build/BUILD/php-7.0.15/ext/pdo_odbc/odbc_driver.c:206)

This isnt a consistent error for all queries and doesn't happen all the time. Im trying to isolate cases where this occures based on the input query but currently struggling to do so.

Has anyone come across this before and could shed light on why this happens? Thanks
Reply with quote Top
User avatar
Posts: 386
Joined: Thu May 23, 2013 4:48 pm

Re: PHP ODBC PDO Communications link failure: Broken Pipe

by markc » Tue Feb 28, 2017 6:33 pm

That looks like an error from the PDO code when trying to prepare an SQL statement prior to executing it. On the face of it, the client has lost communications with the server which can happen for a number of reasons including:
  • your client had a network glitch causing the connection to break
  • an admin job ran and aborted other connections, including your own
  • the database server was restarted, causing all connections to be lost
  • the server has policy based on e.g. idle time which caused it to terminate your connection after a period of inactivity
To find out which of these was the cause, you could speak to the DBA for the server and tell them when the connection was made, and when it failed, then they can check for the above by looking in the serverdbg file, and in IPE_LOGIN and friends on the server itself.

Alternatively, you could switch on ODBC tracing (the UnixODBC documentation will tell you how to do this), and capture a trace for this problem happening - then you will at least have times for the events, and be able to see what ODBC API calls were made leading to the problem. You could attach the resulting trace file to this topic for others to look at if you can't see what is happening yourself.
Reply with quote Top

Who is online

Users browsing this forum: No registered users and 1 guest