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

  • SEARCH
  • Home
  • 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 8321903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:11:05+00:00 2026-06-08T23:11:05+00:00

In Windows, when I stop tomcat, the application will release the hold on database,

  • 0

In Windows, when I stop tomcat, the application will release the hold on database, since the application will stop with tomcat… But in Ubuntu, even if I stop the tomcat application, it’s not releasing access to database.

I tried with

sudo /etc/init.d/tomcat6 stop
sudo service tomcat6 stop

I can’t use pkill, because if I kill the process, even the connection to database server gets released. I need to start it manually. I only want to release access to the database from application. How can I do it?

Is there anywhere tomcat is holding the application? Or any other process there which is on hold?

What creates the difference between Windows and Ubuntu?

  • 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-08T23:11:07+00:00Added an answer on June 8, 2026 at 11:11 pm

    If you stop tomcat by abruptly killing it, rather than stopping it in a way that allows a graceful shutdown, it will not be able to send the network packets to tell PostgreSQL that the connection is closed. If PostgreSQL is listening for the next tomcat request, it will wait for a very long time, never having any clue that tomcat is dead.

    TCP has a configurable feature called “keepalives” which causes a listener to send a packet periodically when the connection is idle, to test whether the connection is still good. See the connection configuration settings that start with “tcp_keepalives_”. I suggest you try something like:

    tcp_keepalives_idle = 60
    tcp_keepalives_interval = 1
    

    This will allow PostgreSQL to detect the broken connection in a little over a minute, without causing very much overhead. This will tell PostgreSQL to wait for 60 seconds on an idle connection before sending extra packets to test whether the connection is still good, and send retries one second apart. (I think it tries nine times.) If none of the packets are answered, PostgreSQL will close the connection and the process will gracefully go away.

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

Sidebar

Related Questions

How can I start and stop a windows service from a c# Form application?
I am running some windows application and it's working for few days then stop
I am trying to develop a windows application to start/stop and monitor status of
I'm running my Java application in cmd.exe in Windows. If I stop the process
How can i control (start, stop) windows service from my windows application?
I am trying to write a c/c++ application that start/stop any windows service of
How to start and and stop a Windows service remotely using PSEXEC? Preferably the
Got a window.history.go(1) to stop the user hitting the back button, but was wondering
Windows form application(.Net 3.5) I have a textbox and a button on the form.
windows 7 does not activate the path for powershell. 1) C:\Windows\System32\WindowsPowerShell\v1.0 exsists in my

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.