Sean
Sean

Reputation: 1474

Apache Tomcat 7 not accepting connections

I am running Apache Tomcat 7.0.42 on Ubuntu 12.04. When I start up Apache initially it's all fine and I can connect. However after using it for a while I can no longer browse to any site hosted on Apache, not even the root site. The browser just waits for a connection forever. If I go on the machine I can see lots of connections that have been closed and are CLOSE_WAIT on netstat, but nothing open. The Apache log file doesn't tell me anything either.

If I restart Apache the problem doesn't go away, even rebooting the server hasn't solved the problem. After struggling for a while it starts working again only to stop shortly afterwards. I don't have any network issues between the machines.

I had a look at the known bugs on 7, but don't notice anything that sounds related. I have also reinstalled Apache on the machine, but the problem returned soon after.

I feel like I'm missing something silly, but I'm just not getting it.

Upvotes: 1

Views: 1400

Answers (1)

Vitthal Kavitake
Vitthal Kavitake

Reputation: 879

I am not sure if this will help, but you can give a try for below options.

The problem may not be for Tomcat7, but for your own site. I have used tomcat for so many days and didnt notice such kind of issue single time.

May be your one of the site is having memory leaks and after running for sometime, it makes server stop because of low memory.

If there are many sites then you can try removing all and adding one by one to check which site is giving the issue.

You can try with simple page first by removing all other sites to check if the issue is with tomcat or your site.

Upvotes: 2

Related Questions