I know this sounds like a generic question, but I need some guidance.
We have a distributed system with Java swing client, Glassfish 3.0.1 as application server and PostgreSQL as database. We are using hessian protocol for communication with the Glassfish 3.0.1 server.
There are around 5 users using the client simultaneously. Everything is running fine, until all users say that their client stops responding for 10 seconds and then it continues to run fine for 15 minutes for example. And then the same thing happens. When I restart the server they say it is fine, but after half a day, again the same thing happens. I looked at the database logs, and I don't see queries above 1 second. I think the problem is connected with the communication to the Glassfish server(all clients cannot communicate to the server at the same time).
How could I approach the problem?
P.S When glassfish stops responding, I can't even open the index.html page properly.
Greetings,
Petar
Related
I'm currently developing a Java Websocket application that is deployed on Wildfly 10. I cannot post the code, but here's the logic:
Multiple threads poll a database every 5 seconds(select query, reusing a PreparedStatement after closing previous ResultSet) and send via Websocket to all connected clients.
Have configured datasource that connects to MYSQL server (localhost).
The application runs fine until a while later, it crashes and the log is full with 'Unable to get managed connection from datasource' errors. Also, Websocket fails with 'ClosedChannelException'.
Services on the same server that open a connection and close it immediately do work fine. However there are 5-6 threads in the concerned code that must use connections after 5 secs so a thread is given a dedicated connection that is only torn down when the application context is destroyed.
Another thing is when the application fails, it works for a lesser time on disable-enable. Only a reboot gets it to work better.
Same project works without error on Glassfish.
Somehow, Wildfly seems to periodically reset either DB connections, or all TCP connections altogether.
Is there a setting that is relevant to Wildfly's behaviour towards threads? I have verified that only as many threads as are intended are actually created.
Any help would be appreciated.
Edit: This application works well on my local machine. When I deploy it on remote server, it works for a while (3 hours max) before failing altogether.
I use Netbeans 8 to compile, if that helps.
I am working with a ubuntu web server, where I have tomcat 8 and running a web application on tomcat. Recently I have faced some problem with cpu uses 100%. When I restart the tomcat server it is running good, but after one day or a few hour again same problem arise ( 100% cpu use) and that problem make my site slow. When I see the process list with htop command then i see so many process like
/opt/java8/jre/bin/java -Djava.util.logging.config.file=/opt/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoader
The website is a live eCommerce website and average user in every moment is around 100.
The server is a aws ec2 server where a tomcat and a java application inside the tomcat is running. The database (MySql) is in an another aws RDS server.
What can i do in this situation? Please help.
I have an application developed with Java using MySQL and C3P0 for connection pooling. The application works perfectly fine in localhost, the connection management was superb. However, I uploaded this application to Daily Razor "private JVM", and here we go, there were lot of MySQL connections than the application will ever make! Normally the application will make max 10 connections, but when I hosted there I can see 30 or more.
Apart from that, I always had number of mysql processors running in my localhost, but when uploaded to the online server I can only see 2. It is like upside down. The application works fine but there were number of times that I had to restart the server due to slow connection issue.
What is making this kind of thing? Anyway pls don't ask for code, because I don't know where the issue is
Currently I am facing application (JAVA RMI based) hang situation and RMI client GUI become Black.
In the application log does not record any exception and client / server communication has completely stopped at one stage. Once user restart the application it will resume the operations.
Initially we thought it was due to a JVM issue since we saw a dump file during this hang situation. This Dump file was not able to open or copy during this time, it is disappearing once we closed the application. We re-installed the JVM but this issue still hits intermittently.
We noticed this issue started few months after the production cutover and we did not come across during our testing and the initial few months of live cutover.
Application background
-RMI client/server based compiled on java 1.7_55
-OS (client Win7 32 bit & Server Win 2008 32 bit data centre), Win2008 runs on VMWare
-DB MSSql server 2008
It would be great if someone can advice me on this.
Thanks and Regards
Chamantha
I wrote a socket client in java that 24/7 connected to a socket server and receive data from it.
the client is running for about 3 days in testing, everything looks fine, and than suddenly I saw this message in the eclipse console (No stack trace):
ServerCommunicatorAdmin reqIncoming
The server has decided to close this
client connection.
I restart the application and now its working again.
I asked the server sysadmin, he says that everything looks fine the his logs.
my system uses mysql jdbc and log4j.
Any idea what can be the source?
Thanks
If you Google ServerCommunicatorAdmin you'll see that it's part of JMX
com.sun.jmx.remote.internal:
ServerCommunicatorAdmin.java
and if you search for "reqIncoming The server has decided to close this client connection" you get lots of hits. There should be something in there to help you.