Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8611687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:26:15+00:00 2026-06-12T04:26:15+00:00

I am using PostgreSQL database in the JSP website. Somewhere my connection is not

  • 0

I am using PostgreSQL database in the JSP website.

Somewhere my connection is not closed in code. So port was opened by the PostgreSQL was remained in ESTABLISHED situation and remained in that state only.

After sometime number of ports exceeds the limit of PostgreSQL total limit and than I have to manually restart the PostgreSQL from Linux by,

service PostgreSQL restart

Is there any way to delete all the ports opened by PostgreSQL through JAVA file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:26:16+00:00Added an answer on June 12, 2026 at 4:26 am

    Take a look at the pg_cancel_backend() function: http://www.postgresql.org/docs/8.2/static/functions-admin.html

    However, you should consider trying to fix the unclosed connections in your code as you are likely to run into memory issues and other strangeness.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I updated a database table using postgresql from python My code was import psycopg2
I'm adding a new, NOT NULL column to my Postgresql database using the following
I have a postgresql database and am using it for a project which handles
I am using pgAdmin version 1.14.3. PostgreSQL database version is 9.1. I got all
I've been storing dates in a PostgreSQL 8.3 database table using a query resembling
I was using Mysql database before and decided to switch to Postgresql and now,
I am using PostgreSQL Database. I want to get a column values from a
While editing some records in my PostgreSQL database using sql in the terminal (in
I write an application based on an already existing database (postgreSQL) using JPA and
When I need to read millions of database rows from a PostgreSQL database using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.