Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client unable to establish connection #185

Closed
iamroi opened this issue Apr 6, 2019 · 4 comments
Closed

Client unable to establish connection #185

iamroi opened this issue Apr 6, 2019 · 4 comments
Assignees
Labels

Comments

@iamroi
Copy link

iamroi commented Apr 6, 2019

The extension is working great but I'm getting the below error at random times on EC2 Ubuntu, Laravel. I'm using Laravel queue cron to run the script and it fails at PDOStatement->execute() randomly.

PDOException: SQLSTATE[08001]: Client unable to establish connection: 240009 Request returned as being unsuccessful

Any idea where this is going wrong?

@iamroi
Copy link
Author

iamroi commented Apr 8, 2019

Is there any update on this, please?

@sfc-gh-kwagner
Copy link
Contributor

I think what is going on is that you're running a query with a connection that is expired and can't be renewed. The error that you got back is pretty generic so to be sure about my hunch, can you collect and post the following information:

1 ) System OS and version
2) PHP Version (including if it is a NTS build)
3) A code snippet of what you are running (as much as you feel comfortable exposing to us)
4) Log files from when the error occurred.

@adambutch
Copy link

I have the same issue with the pdo_snowflake version 1.2.5 build on docker image php:8.0.24-apache.

It happens randomly on any SQL query after some time I thought it might be a network issue but what I found in the log file was: "Renew session was unsuccessful"

I tried on both user/password and key-pair authentication and it happens from time to time on both.

Here is a full log

2023-03-22 07:36:10.872 DEBUG PDO snowflake_driver.c 371: dbh=0x55ca47a5ee10, attr=
2023-03-22 07:36:10.883 DEBUG PDO snowflake_driver.c 385: unsupported attribute: 12
2023-03-22 07:36:10.883 DEBUG PDO snowflake_driver.c 186: dbh=0x55ca47a5ee10
2023-03-22 07:36:10.883 DEBUG PDO snowflake_driver.c 187: sql=SELECT DISTINCT ", lower(C), len=236
2023-03-22 07:36:10.883 DEBUG C client.c 1828: Command size non-zero, setting as sql text size.
2023-03-22 07:36:10.884 DEBUG C client.c 1968: Created body
2023-03-22 07:36:10.884 DEBUG C connection.c 668: URL: https://.snowflakecomputing.com:443/queries/v1/query-request?requestId=a8eb1526-755e-468d-&request_guid=00000000-
0000-0000-0000-000000000000
2023-03-22 07:36:13.045 DEBUG C connection.c 862: Curl response size: 144
2023-03-22 07:36:13.045 DEBUG C connection.c 737: Item and Value; code: 390112
2023-03-22 07:36:13.045 DEBUG C connection.c 980: Updating session. Master token: *****
2023-03-22 07:36:13.045 DEBUG C connection.c 668: URL: https://
.snowflakecomputing.com:443/session/token-request?request_id=5971f88e-7e76-4914-9d7e-****&request_guid=00000000-00
00-0000-0000-000000000000
2023-03-22 07:36:13.077 DEBUG C connection.c 862: Curl response size: 227
2023-03-22 07:36:13.077 DEBUG C connection.c 737: Item and Value; code: 390114
2023-03-22 07:36:13.077 DEBUG C connection.c 754: Item and Value; success: 0
2023-03-22 07:36:13.077 ERROR C connection.c 1019: Renew session was unsuccessful
2023-03-22 07:36:13.080 DEBUG PDO snowflake_driver.c 45: file=/tmp/snowflake/pdo_snowflake-1.2.5-linux/snowflake_stmt.c line=115
2023-03-22 07:36:13.080 ERROR PDO snowflake_driver.c 47: stmt error
2023-03-22 07:36:13.080 ERROR PDO snowflake_driver.c 56: error code: 240009
2023-03-22 07:36:13.080 ERROR PDO snowflake_driver.c 71: sqlstate: 08001, msg: Request returned as being unsuccessful

@sfc-gh-dszmolka
Copy link
Contributor

hi - there's been a couple releases since this issue was created (and unfortunately left largely unattended )
closing this issue for now but if it's still a problem, do comment please and I'll reopen. If you have a reproduction code snippet which can generally lead to the issue, that would be very helpful too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants