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

Improve Timescale instance for "Too many clients already" #26

Open
tomjohn1028 opened this issue Sep 9, 2021 · 1 comment
Open

Improve Timescale instance for "Too many clients already" #26

tomjohn1028 opened this issue Sep 9, 2021 · 1 comment

Comments

@tomjohn1028
Copy link
Contributor

The following error was showing up in some Hasura logs

{"type":"http-log","timestamp":"2021-09-09T01:34:32.766+0000","level":"error","detail":{"operation":{"user_vars":{"x-hasura-role":"admin"},"error":{"internal":"FATAL:  sorry, too many clients already
","path":"$","error":"connection error","code":"postgres-error"},"request_id":"d8de1115-fa19-41ff-b5c9-149a78b9b095","response_size":118,"query":{"variables":{"object":{"order_id":"46891623435369680254532","client_id":"9254101784418634862","serum_market_address":"qDvaLApMYkbp9NTgYJaNy7CDsPhXMbDjEr3g3oqEMaw","account":"Abe39jLaH5BSmLryRbAGu1wMfCgPkXnvkQV7JZDuvDxT","slot":95649683,"account_slot":2,"type":"done","side":"sell","timestamp":"2021-09-09T01:33:51.437Z"}},"query":"
      mutation ($object: serum_events_insert_input!) {
        insert_serum_events_one(object: $object) {
            serum_market_address
        }
      }
      
        "}},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"3.70.45.116","method":"POST","content_encoding":null}}}

This seems to coincide with when a new Hasura task is being spun up and the old one is being shut down (see image below for hasura timing).

Screen Shot 2021-09-08 at 11 04 06 PM

And the following for Timescale's last error logs.

Screen Shot 2021-09-08 at 11 05 02 PM

This makes sense as the Hasura connection pool would surpass the postgres max_connections if two were running at the same time and they used the Timescale tuning to determine max connections.

@tomjohn1028
Copy link
Contributor Author

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

No branches or pull requests

1 participant