Glassfish application server stops responding on certain port after some period of time

I  have a glassfish application server Version = Sun GlassFish? Enterprise Server v2.1 (9.1.1) (build b60e-fcs) running in production and every day or so stops responding on the https port (8181) and other ports(8080). Once the server stops responding, other application hosted with that port number stops responding. I've hosted two application in the server.

I searched for clue in log files but could not get one.

I've set thread size to 200.

In netstat i can CLOSE_WAIT status for different hosts.

The server needs to be restarted after it stops responding.

This application


LVL 9
darkappleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
>>In netstat i can CLOSE_WAIT status for different hosts.

Does netstat tell you it's still listening on those ports or not?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mick BarryJava DeveloperCommented:
sounds like you have run of of connection threads.
do a thread dump to check the state of the threads

0
CEHJCommented:
Anyway, if it *is* still listening, that rules out tcp/ip problems probably and you need to see if you enough allocated resources. http://blogs.sun.com/binublog/entry/monitoring_in_glassfish is a good place to start
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

darkappleAuthor Commented:
*.8181 seems to be in LISTEN status
there are other ESTABLISHED status also.

once i'll check the state of the threads

0
Mick BarryJava DeveloperCommented:
yes it will still be listening, the error would be different if it wasn't listening

0
darkappleAuthor Commented:
i've migrated the glassfish to another pc and now its working fine. but now the i'm getting errors like

Caused by: java.sql.SQLException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115)
        at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
        ... 80 more


i tried closing all connection in my database manager class. i think the glassfish server is not returning the connections to pool.
0
darkappleAuthor Commented:
i guess the jpa i'm using with my ejb is not releasing connection to the pool.


0
darkappleAuthor Commented:
thanx guys i've found out the hole in my application code.

i'm using enity manager factory using the datasource from glassfish. Also in one part, i'd accessed the datasource through jndi which i forgot to close. It was creating problems.
0
darkappleAuthor Commented:
thanx.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.