> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superjoin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Troubleshoot your PostgreSQL Connection?

> A comprehensive guide to diagnosing and resolving common PostgreSQL connection issues while connecting PostgreSQL and Google Sheets using Superjoin.

<AccordionGroup>
  <Accordion title="Network Connection Refused">
    <h4> Error Message: Please make sure that your database is running and you have whitelisted all three of our IP address (3.6.225.10, 13.205.69.7, 13.204.201.25) </h4>

    <iframe width="560" height="415" src="https://www.youtube.com/embed/te4KTGF3V3M?si=dtw60HckBoVD7bkX" title="Error: Connection Refused - While connecting MySQL/PostgreSQL to Google Sheet" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen style={{ width: "100%", borderRadius: "0.5rem" }} />

    ### Action Steps

    <Steps>
      <Step title="Verify DB is running">Check Database Server: Ensure that your PostgreSQL server is actively running.</Step>
      <Step title="IP Whitelisting">Modify your PostgreSQL settings to include the IP addresses (3.6.225.10, 13.205.69.7, 13.204.201.25) in the whitelist, which may involve adjusting the pg\_hba.conf file or firewall settings. More information on whitelisting <a href="ip-whitelisting">here</a> </Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="Network Connection Not Found">
    <h4> Error Message: Unable to connect to the database, please make sure that your database URL is correct. </h4>

    ### Action Steps

    <Steps>
      <Step title="Verify">Double-check the database URL in your connection settings to ensure it is correct and properly formatted.</Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="Incorrect Database Credentials">
    <h4> Error Message: Incorrect database credentials. Please verify the username and password. </h4>

    <iframe width="560" height="415" src="https://www.youtube.com/embed/psp3_1s8aIA?si=hyftCjk-_r7JQMUM" title="Error: Incorrect database credentials - While connecting MySQL/PostgreSQL to Google Sheet" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen style={{ width: "100%", borderRadius: "0.5rem" }} />

    ### Action Steps

    <Steps>
      <Step title="Verify"> Make sure that the username and password in your connection settings are accurate and correspond to what is configured on your PostgreSQL server.</Step>

      <Step title="Reset password">
        If necessary, reset the password for the user in PostgreSQL and update it in your connection settings.

        <CardGroup cols={1}>
          <Card title="Create New User in PostgreSQL" icon="user-plus" iconType="duotone" href="create-new-user">
            Learn how to create a new user in PostgreSQL to provide appropriate read only access.
          </Card>
        </CardGroup>
      </Step>

      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="Database Does Not Exist">
    <h4>Error Message: Database does not exist. Please verify the database name.</h4>

    <Steps>
      <Step title="Verify db name">Confirm that the database name in your connection settings matches an existing database on your PostgreSQL server. This common issue occurs when the database name is misspelled or the database was not created. Here's the command: `\l`</Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="Connection Attempt Timed Out">
    <h4> Error Message: Connection attempt timed out. Please try again later. </h4>

    <iframe width="560" height="415" src="https://www.youtube.com/embed/kd_lba44ZmY?si=AcXvvO96n-5uZPAW" title="Error: Connection Refused - While connecting MySQL/PostgreSQL to Google Sheet" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen style={{ width: "100%", borderRadius: "0.5rem" }} />

    ### Action Steps

    <Steps>
      <Step title="Verify liveness">Check if the PostgreSQL server is operational and not undergoing maintenance or downtime which could impede connections.</Step>
      <Step title="Whitelist IP"> Ensure that the IP addresses (3.6.225.10, 13.205.69.7, 13.204.201.25) is added to the whitelist in your PostgreSQL settings, which may include modifying the pg\_hba.conf file or adjusting firewall settings to allow the connection.</Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="Connection Timeout Exceeded">
    <h4> Error Message: Connection timeout exceeded. Please verify the host and port details. </h4>

    <iframe width="560" height="415" src="https://www.youtube.com/embed/kd_lba44ZmY?si=AcXvvO96n-5uZPAW" title="Error: Connection Refused - While connecting MySQL/PostgreSQL to Google Sheet" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen style={{ width: "100%", borderRadius: "0.5rem" }} />

    ### Action Steps

    <Steps>
      <Step title="Verify host & port">Double-check that the host and port information in your connection settings are correct and that the PostgreSQL server is actively listening on that host and port.</Step>
      <Step title="Firewall settings"> Check to see if any firewall configurations are blocking the connection to the specified port.</Step>
      <Step title="IP Whitelisting"> Confirm that the IP addresses (3.6.225.10, 13.205.69.7, 13.204.201.25) is whitelisted within your PostgreSQL settings, possibly requiring changes to the pg\_hba.conf file or firewall configurations.</Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="Maximum Connection Limit Reached">
    <h4> Error Message: Maximum connection limit reached. Please try again later </h4>

    ### Action Steps

    <Steps>
      <Step title="Close Unused Connections">Review the current connections to your PostgreSQL server and close any that are unused or stale to free up space for new connections.</Step>
      <Step title="Increase Max Connections"> Consider adjusting the max\_connections setting in your postgresql.conf file to increase the number of allowable concurrent connections, ensuring your server is equipped to handle the additional load.</Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="IP Not Whitelisted" defaultOpen="true">
    <h4> Error Message: Unable to connect to the database. Please make sure that you have whitelisted all three of our IP address (3.6.225.10, 13.205.69.7, 13.204.201.25) </h4>

    <iframe width="560" height="415" src="https://www.youtube.com/embed/-EVGru4BQ8E?si=_tdDIIVD4ek4UB6B" title="Error: Connection Refused - While connecting MySQL/PostgreSQL to Google Sheet" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen style={{ width: "100%", borderRadius: "0.5rem" }} />

    ### Action Steps

    <Steps>
      <Step title="IP Whitelisting"> Double-check your PostgreSQL configurations to ensure all three of our IP addresses (3.6.225.10, 13.205.69.7, 13.204.201.25) are properly whitelisted. This may require adjustments in the pg\_hba.conf file or firewall settings to allow the connection. More on this <a href="ip-whitelisting">here</a> </Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="Unknown Error">
    <h4> Error Message: An unknown error occurred while connecting to the database </h4>

    ### Action Steps

    <Steps>
      <Step title="Review Error Logs">Examine the PostgreSQL server logs for any clues or additional details regarding the error.</Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="Incorrect Database URL">
    <h4> Error Message: Unable to connect to the database. Please make sure that your database URL is correct </h4>

    ### Action Steps

    <Steps>
      <Step title="Correct Host">Double-check the host entered in your connection settings to ensure it matches the server where your PostgreSQL database resides.</Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>
</AccordionGroup>

## Summarising all the errors that you could face while connecting to your PostgreSQL DB

<Frame>
  <img src="https://mintcdn.com/superjoin/95T8cmea616drJuC/images/postgres/postgres-error-chart.webp?fit=max&auto=format&n=95T8cmea616drJuC&q=85&s=654cc6dd1054acef684406b7bfbcf772" width="2261" height="1269" data-path="images/postgres/postgres-error-chart.webp" />
</Frame>
